Blog
i can

Dawn May

Dawn May




Bookmark and Share

October 2014

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

« IBM Systems Director 6.3 and IBM i | Main | A Peek at AIX From an “i Guy” (ok, Girl) »

March 05, 2012

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83545a5d153ef0168e86e974a970c

Listed below are links to weblogs that reference Is Your IBM i Ready for Daylight Saving Time?:

Comments

So after reading your post I wondered: In RPGLE, how would I get the current UTC in timestamp format (to avoid some of the issues you mentioned at the beginning)? I check a few APIs and noticed that QWCCVTDT has had some optional parameters added since I last used it. It appears that calling it with appropriate values and then converting the 20-character output with %timestamp(Output:*ISO0) will do it. Or is there an even easier way?

Russ, you are correct. The Convert Date and Time Format (QWCCVTDT) API can be used to convert from UTC to another time zone or vice versa and can be converted to one of several formats. It can also be used to get the current time of day and return it in any format. I'm not an RPG expert, but I believe there may a built-in function to get the current date-time also, but I think the RPG run-time uses this same API under the covers, so I guess it depends on what you are doing, as to which would be easier.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.