Native DB - How to display UTC ?

LouisLouis Member Posts: 78
Native DB - How to display UTC ?

12H16 in Belgium => UTC 11H16 in London
or 16H16 in Asia/Katmandu
or 10H16 in Africa/Abidjan

How to capture and how to display UTC ?

Suppose an entry at the "same time" in these locations :
- Brussels, - London, - Katmandu and - Abidjan.

I need to show the UTC of the four entries in Brussels.
Any idea ?
Louis :oops:

Comments

  • KowaKowa Member Posts: 925
    +1h
    NewTime := Time + 60 * ( 60 * 1000);
    -1h
    NewTime := Time - 60 * ( 60 * 1000);
    -2h
    NewTime := Time - (2 * 60) * ( 60 * 1000);
    +4h
    NewTime := Time + (4 * 60) * ( 60 * 1000);
    Kai Kowalewski
  • LouisLouis Member Posts: 78
    Thank you - but I'm looking for an Universal formula.
  • KowaKowa Member Posts: 925
    Louis wrote:
    Thank you - but I'm looking for an Universal formula.
    The formula is universal already, if you create a time zone table with a code column ( primary key) for the time zone and a "TimeShift (UTC + X)" column , all you need is a

    Get(TimeZoneCode) // for the required time zone

    on that table to calculate the

    TimeZoneTime := Time + (TimeZone."TimeShift (UTC + X)" * 60) * ( 60 * 1000);
    Kai Kowalewski
Sign In or Register to comment.