I have a Query that uses this snippet:
Lead.Category='C' AND Lead.FollowUp=CURRENT_DATE
For a West Coast user who has Pacific TimeZone set, the items are incorrect after 12pm (midnight) EST.
Its like the CURRENT_DATE function doesn't interrogate TimeZone to adjust the time.
Am I using a function incorrectly?
Is this supposed to be supported somehow?
thx
jaymer...
Is CURRENT_DATE subject to Timezone?
Is CURRENT_DATE subject to Timezone?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Is CURRENT_DATE subject to Timezone?
That's weird! From what I understand a Lead.FollowUp should always be saved in server time.. If a user on West Coast creates a lead then the follow up time should display in their time but be saved server time ...
Thinking through this:
User creates a follow up time for 18h00 on the 5th of Sept in a GMT -8 time zone.. Server time is GMT. This is saved as 02:00 on the 6th of Sept in the DB..
I guess this - Lead.FollowUp=CURRENT_DATE - would return false at 15:59 user time and return true at 16:01 ...
I think it's the user's current time that gets converted to server time rather than the server time converted to user's time..
I haven't done much with time zones..
Thinking through this:
User creates a follow up time for 18h00 on the 5th of Sept in a GMT -8 time zone.. Server time is GMT. This is saved as 02:00 on the 6th of Sept in the DB..
I guess this - Lead.FollowUp=CURRENT_DATE - would return false at 15:59 user time and return true at 16:01 ...
I think it's the user's current time that gets converted to server time rather than the server time converted to user's time..
I haven't done much with time zones..
Re: Is CURRENT_DATE subject to Timezone?
I'm not actually dealing with times (in the data).
Seeing that Leads for tomorrow appeared "Today" after 9pm at night on the WC, I added 2 HTML fields to a FORM for testing.
CURRENT_DATE and CURRENT_TIME
They both showed Server time, rather than adjusting for the LIRU TimeZone.
To me it looks like a simple oversight on the CURRENT_DATE function. I would think that it would adjust its reported time based on TZ.
And then it would have still shown Sept. 4 in California, even though server was already Sept. 5
Seeing that Leads for tomorrow appeared "Today" after 9pm at night on the WC, I added 2 HTML fields to a FORM for testing.
CURRENT_DATE and CURRENT_TIME
They both showed Server time, rather than adjusting for the LIRU TimeZone.
To me it looks like a simple oversight on the CURRENT_DATE function. I would think that it would adjust its reported time based on TZ.
And then it would have still shown Sept. 4 in California, even though server was already Sept. 5
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Is CURRENT_DATE subject to Timezone?
MS SQL uses timezone from the Registry.idpSteve wrote:That's weird! From what I understand a Lead.FollowUp should always be saved in server time.. If a user on West Coast creates a lead then the follow up time should display in their time but be saved server time ...
And the getdate() function uses server time, as opposed to getutcdate()
And when I browse a SQL table (in SQL), I'm seeing a datetime as the local server time.
When browsing it in Aware, its adjusting based on my LIRU Timeszone
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Is CURRENT_DATE subject to Timezone?
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL