one more help please how to convert GMT to central time?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
tini
Participant
Posts: 24
Joined: Thu Jun 19, 2003 6:37 am

one more help please how to convert GMT to central time?

Post by tini »

What is GMT?
and how can GMT convert to central time?
could someone please help.
Thanks
:oops:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Something like that I would simply Google for. GMT is 'Greenwich Mean Time' and is basically the zero point for all timezone offsets. 'Central' is defined as GMT-6 so you subtract six hours from GMT to get Central.

And then there's Daylight Saving Time...
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

And then there's your assumption that tini is in the USA...
:wink:

Australia also has Central Time, defined as GMT +8.5 hours (some of it goes onto daylight saving in the Southern summer, some of it does not).

There are some SDK Transforms for converting GMT, if my memory serves me correctly. You can also use System(99), which returns the number of seconds since midnight GMT on 1970-01-01 and Oconv(thedate, "DZ") to return the time zone, and make some formula based upon these.

The switch to and from daylight saving is never easy, particularly in those countries that move it around for political convenience or otherwise manage it in a non-uniform fashion.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ray.wurlod wrote:And then there's your assumption that tini is in the USA... :wink:
Well, yah... duh, isn't everyone? :wink:

In my defense, I popped open my Windows Time Zone dialog on my PC and pulled down the entire list of time zones. There was only one labelled as Central, so thought the assumption was safe. Unfortunately, it has no "+8.5" entry but does show "+8.0" as "Perth". FWIW.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I checked mine, and it's showing GMT +09:30 (which is actually correct at the moment).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tini
Participant
Posts: 24
Joined: Thu Jun 19, 2003 6:37 am

Post by tini »

Thank you for all your help but I really don't get it. :oops: :oops: :oops:
so I should take
GMT - 6 right?

and then how do I handle Daylight saving time? like Chulett said?

Hi, ray.wurlod.
What do you mean by GMT +09:30 (which is actually correct at the moment).?
Could you explain more please :( :(
Thanks
tini
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What I meant was that Central time in Australia is currently 9h30 ahead of GMT.

This has nothing whatsoever to do with the Central time zone in the USA.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tini
Participant
Posts: 24
Joined: Thu Jun 19, 2003 6:37 am

Post by tini »

Thanks ray.wurload.
Sorry Iam asking so much
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

But you never did get an answer about daylight saving time. Nor is there a ready answer. You could interrogate the system's time zone setting, and trust that it has been set correctly. You could rely on the legislation about the changeover dates, but these may change in future (they are changing this coming summer in some states in Australia, for example).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tini
Participant
Posts: 24
Joined: Thu Jun 19, 2003 6:37 am

Post by tini »

If the input is
Char 14 (20060911150001) but it's represent of GMT time.
How do I convert it to Central time? at this point I don't care about Daylight Savings.

What I did is I take I convert to (StringToTimeStamp - 5) but it didn't work. :oops: :cry:

Please help.
Thanks
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The -5 you used subtracted 5 seconds from the TimeStamp; you need to subtract (5*60*60) from the timestamp.
Post Reply