[rt-devel] RT::Date GMT vs Local
jim.rowan at starcore-dsp.com
Sat Dec 6 12:59:43 EST 2003
> Date handling in RT have some issues with subj.
> SetToNow - set to local time, but
> SetToMidnight - use GMT.
> May be this module should be refactored in any way?
Hi Ruslan, I'm glad you brought that up!
I have a corrollary question/issue:
[postgres, if that detail matters -- and RT 3.0.6]
If I understand correctly, all the times in the database are GMT,
without timestamp. RT obviously understands this and converts back and
forth as it needs to based on the Timezone, which is part of the local
configuration. All well and good -- except:
If my timezone uses daylight savings time (as most do);
Suppose the time of some transaction is 3:00PM clock time, and DST
happens to be in effect;
If I go look at that transaction (via RT) later in the year when DST is
not in effect, does it say 3:00 or something else? (4 or 2, or 2:30 if
you are in some odd part of the world..:)
Can someone with more understanding of the internals answer this?
(saving me a few hours of code-wading..!)
[This came up because one of my people is doing some fairly complicated
reporting directly out of the database; they want to report on monthly
statistics for billing/financial purposes. The reporting period is
monthly, based on our local time. We concluded that they needed to
factor in DST in the query, because we need the report to say the same
thing if it is run in July or December (on July's data). Thus, we
subtract either 5 or 6 hours depending on what time of the year the
timestamp refers to. We wished this ajustment wasn't necessary! The
question above is basically: is RT making this adjustment?]
More information about the Rt-devel