Author |
Message |
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
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 Logged |
|
turdferguson
Newbie
Joined: 16 Feb 2012
Online Status: Offline
Posts: 30
|
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 Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
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 Logged |
|
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
|
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 Logged |
|
turdferguson
Newbie
Joined: 16 Feb 2012
Online Status: Offline
Posts: 30
|
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 Logged |
|
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
|
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 Logged |
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
|
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 Logged |
|
edmhess
Newbie
Joined: 29 Feb 2012
Online Status: Offline
Posts: 2
|
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 Logged |
|
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
|
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 Logged |
|
turdferguson
Newbie
Joined: 16 Feb 2012
Online Status: Offline
Posts: 30
|
Posted: 29 Feb 2012 at 3:54am |
Originally posted by rkrowlandIt 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 Logged |
|
|