Convert GMT/UTC to local time



IBM's Command List programming language & Restructured Extended Executor

Convert GMT/UTC to local time

Postby desaubin » Thu Feb 07, 2008 10:55 pm

I am looking for a algoritm to convert GMT/UTC to local time (Europe: during winter +1, during summer +2).
Anything out there?
desaubin
 
Posts: 6
Joined: Thu Jan 31, 2008 2:41 am
Has thanked: 0 time
Been thanked: 0 time

Re: Convert GMT/UTC to local time

Postby Bill Dennis » Wed Jun 11, 2008 7:12 pm

Assembler macro CONVTOD will apply your offset (+/- hours) to a UTC timestamp.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Convert GMT/UTC to local time

Postby desaubin » Wed Jun 11, 2008 8:59 pm

Is CONVTOD supplied with z/OS?
desaubin
 
Posts: 6
Joined: Thu Jan 31, 2008 2:41 am
Has thanked: 0 time
Been thanked: 0 time

Re: Convert GMT/UTC to local time

Postby Bill Dennis » Wed Jun 11, 2008 9:44 pm

Yes, it's supplied with z/OS. Read about it the MVS Assembler Macros Reference manual. You could check the LE Callable Services as there may be a function there, too.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Convert GMT/UTC to local time

Postby steve-myers » Tue Sep 11, 2012 4:19 pm

Actually, I'm not sure Mr. Dennis is correct. CONVTOD translates binary TOD clock values to a more digestible format, but I do not believe it applies time zone and leap second corrections to the binary TOD clock values. Your program must do that using the leap second and timezone correction constants in the secondary CVT. By the way, using CVTTZ does not work correctly: it does not have leap second correction built into it, and you should not use it.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Convert GMT/UTC to local time

Postby Akatsukami » Tue Sep 11, 2012 7:49 pm

Bill Dennis wrote:You could check the LE Callable Services as there may be a function there, too.

It is CEEGMTO.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post