Hi
I have an application which consists of a front end form and a content management admin system, It's used for booking appointments.
The form correctly displays the time e.g. 18.24 BST/GMTI think the time is save as UTC in the DB 17.24 UTCWhen the CMS displays the time it dislpays the 17.24 UTC time.Can someone point me to the most straight forward solution to display the correct time in the CMS.
The CMS is only used in the UK so I don't care about other timezones.
Any help appreciated.
Thanks,
John
@JayPea : OutSystems stores date/time values in UTC by default. On the UI they’re rendered according to the user’s timezone, which is why the form shows the correct local time. How are you rendering the date/time in the CMS? Maybe you could share a bit more context.
Hi,
Yes it's displaying UTC but I need to adjust it for BST British Summer Time.
Thanks
Could you please show what control are you using in CMS ? Or if you have sample OML to share please do so.
The most straightforward solution in OutSystems is:
Use the AddHours function (for example, AddHours(CretedDateTime, 1)) to adjust for GMT+1 during BST,
or
Better, use the built-in function TimeZone_ConvertFromUTC to convert UTC to the current server time zone or a specific UK time zone.
For summer/winter changes, using the TimeZone functions is safer because they automatically handle daylight saving.