E9.2 BSFN to convert time between time zones?

JDE kid

Active Member
I have a need to convert the time between time zones - From say Pacific time to Central time.

E.g.:
If I have a time value of 174500 which is 5:45 pm in PST, it needs to be converted to other time zones. So, it should be returning:
8:45 pm (204500) for EST,
7:45 pm (194500) for CST,
6:45 pm (184500) for MST,
2:45 pm (144500) for HST,
etc.

We also need to consider the Standard time vs Daylight time.

I am guessing there should be a BSFN available to help with this. I came across B9800009 - just not sure how exactly this can be used for the purpose.

Reaching out to see if anyone tried this. If yes, an example BSFN call with IN and OUT values would be great.

Thanks in advance!

JDE Kid
JD Edwards 9.2/9.2.5.1/Linux
 
Last edited:
If it helps
I think you need to convert a date time into UTC (GetCurrentUTCTimeWithSeconds) (UTC time is seconds elapsed since some date in 1970s lol)
You can use it in 2 modes, just get the current UTC or pass in a date time for it to convert it (here is where you can play with the conversions)

Or then try convert the UTC you obtained above into a local time zone using ConvertUTCTimeToLocal)

Daylight rules exist on F00085
Time Zones are UDC H91 TZ
 
Thanks, John. I think you are right. Just need the details of how to call B9800009.ConvertUTCTimeToLocal. The parameters and the direction are confusing. I didn't find documentation on the BSFN too. Looking for an example call with IN and OUT values.

1667347026362.png
 
If you look in ther XREF, you'll see a few places that call it. Have a look at what they do
 
B90CG010

Seems to work a bit better

20 is from UDC H91 TZ
USa is from F00085 It's chopping -6:00 hrs off my time here in Ireland
1668084777316.png
 
Back
Top