Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: ShiftDateTime DST issues Post Reply Post New Topic
<< Prev Page  of 5 Next >>
Author Message
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 21 Feb 2012 at 10:09am
just to be the smartass, out of the 100 reports that I have written, plus probably another 50 - 75 that others have written over the years for our app, we use this functionality in 0...
 
again, just being a smartass. ;)
IP IP Logged
turdferguson
Newbie
Newbie


Joined: 16 Feb 2012
Online Status: Offline
Posts: 30
Quote turdferguson Replybullet Posted: 21 Feb 2012 at 10:13am
:'( Mean! It just so happens this happens to us since we store our dates in AX 2009 and 2012 in UTC.... Dunno if this was an issue before! It was just thrown on my plate and i've scoured all over and was just told to update crystal reports... that didnt work... so i tried posting here while writing some custom code for it.

It's a really stupid issue too. They cant get past how Crystal doesnt do it itself, and I'm tasked with finding out anything I can.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 21 Feb 2012 at 10:26am
sorry for your predicament.
 
I was talking with a co-worker, and he was saying there are databases out there that have all the zip codes and some time information. He didn't know if DST was part of that, but it might be an aid / alternative.  I believe he said TigerLine.
 
Another co-worker mentioned that DST is a american/european thing.
 
relations to GMT is easier worldwide, relative to PST or PDT (or any other region) is easier in US, but DST is complex as you might be in the CDT timezone but not follow DST, so you would be CST (again Arizona and Indiana are my examples)...
 
so it just isn't a simple problem to solve
 
HTH
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 21 Feb 2012 at 10:14pm
How many different timezones have you got to adjust for? How are you identifying which timezone (irrelevant of DST or BST as it's known here in the UK) should be applied without parameters?
IP IP Logged
turdferguson
Newbie
Newbie


Joined: 16 Feb 2012
Online Status: Offline
Posts: 30
Quote turdferguson Replybullet Posted: 22 Feb 2012 at 2:43am
That's the fun part. We have customers for many different time zones worldwide, and of course, many countries dont follow DST so that's where this becomes difficult. 
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 22 Feb 2012 at 2:59am
Well for examples sake - let's say we could do all the timezone & DST adjustments for your users.
 
How exactly would you determine which of the timezone adjustments is applicable to the user's local timezone without the use of parameters?
 
Even if Crystal could automatically determine timezone adjustments and DST adjustments there'd still be no way to do what you want without atleast 1 parameter where the user must state at the very least where they live. Atleast not to my knowledge.
 
I'm still standing by the +/- hours parameter - it's simple, clean and easy to understand haha!
 
Regards,
Ryan.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 22 Feb 2012 at 3:36am
While I realize it is against the specs....
 
I agree with rkrowland...if you are in another country, I am willing to bet that you are already used to converting times from GMT.
 
and while you're not dealing with aviation (i'm willing to bet) all pilots need to be able to convert from GMT as the weather reports are given in GMT...and it's in all the emails as well so it is fairly pervasive.
 
it might confuse us silly Americans, but then you might be able to EST/PST/CST/MST or with D to make them happy.
 
just a thought
IP IP Logged
edmhess
Newbie
Newbie


Joined: 29 Feb 2012
Online Status: Offline
Posts: 2
Quote edmhess Replybullet Posted: 29 Feb 2012 at 3:20am
I also need this functionality for a global implementation of Charles River IMS where the server will be located in PA but the reports will be run in Melbourne.  I'd like to avoid having end-users set a parameter for their time zone so that DST can be accounted for.  I believe the OS knows what time it is in Melbourne as I can set an option in the Charles River app to Australia/Melbourne and the UIs show their time.  My other option is to offset the time zone on the reporting server in PA but that causes problems for the operations team.
 
As more companies run global operations this will become more of a problem.
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 29 Feb 2012 at 3:36am
It shouldn't be a major task to do this via a formula for a single timezone adjustment - the reason we advised use of parameters for the OP is because he needed conversions and DST adjustments for various time zones.
 
A formula to check whether the date falls in the DST period, then 2 dateadd formulas to adjust the hours by varying amounts depending on whether or not it falls in the DST period.
 
Regards,
Ryan.
IP IP Logged
turdferguson
Newbie
Newbie


Joined: 16 Feb 2012
Online Status: Offline
Posts: 30
Quote turdferguson Replybullet Posted: 29 Feb 2012 at 3:54am
Originally posted by rkrowland

It shouldn't be a major task to do this via a formula for a single timezone adjustment - the reason we advised use of parameters for the OP is because he needed conversions and DST adjustments for various time zones.
 
A formula to check whether the date falls in the DST period, then 2 dateadd formulas to adjust the hours by varying amounts depending on whether or not it falls in the DST period.
 
Regards,
Ryan.


It's more than just simple dateadd formulas. You have to check second sundays for both November and March.

Even moreso, you'll have to somehow check if its in an area that observes DST, and without a param or a DB value, I'm not sure how that's going to be done. But the big issue is why Crystal doesnt support DST when converting from UTC.
IP IP Logged
<< Prev Page  of 5 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.