In the documentation for the time intrinsic it says for Now
Now returns the current UTC time.
The result may need to be adjusted for local time zones
But there seems to be no other intrinsic to make this adjustment. How do I find the current time here in Sydney Australia?
Time Intrinsic
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Time Intrinsic
Hi Jim
On the web, a Time variable will return the local time, and a DateTime variable will return the UTC. DateTime has the .AsLocalizedDateTime intrinsic.
Regards
On the web, a Time variable will return the local time, and a DateTime variable will return the UTC. DateTime has the .AsLocalizedDateTime intrinsic.
Regards
Code: Select all
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(500) Width(850) LayoutManager(#Layout1)
Define_Com Class(#PRIM_TBLO) Name(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutRow1) DisplayPosition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutColumn1) DisplayPosition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) DisplayPosition(2) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Column(#LayoutColumn1) Manage(#Label) Parent(#Layout1) Row(#LayoutRow1) Sizing(None) Flow(Down)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem2) Column(#LayoutColumn1) Manage(#Label2) Parent(#Layout1) Row(#LayoutRow1) Sizing(None) Flow(Down) MarginTop(8)
Define_Com Class(#Prim_kcol<#Prim_alph #std_text>) Name(#Strings)
Define_Com Class(#PRIM_LABL) Name(#Label) Caption('Label1') DisplayPosition(1) Ellipses(Word) Height(86) Left(144) Parent(#COM_OWNER) TabPosition(2) TabStop(False) Top(82) VerticalAlignment(Center) Width(563) ThemeDrawStyle('DarkTitle+Title') Alignment(Center)
Define_Com Class(#Prim_timr) Name(#Timer)
Define_Com Class(#PRIM_LABL) Name(#Label2) Caption('Label1') DisplayPosition(2) Ellipses(Word) Height(86) Left(144) Parent(#COM_OWNER) TabPosition(1) TabStop(False) Top(176) VerticalAlignment(Center) Width(563) ThemeDrawStyle('DarkTitle+Title') Alignment(Center)
Evtroutine Handling(#Timer.Tick)
Define_Com Class(#Prim_Time) Name(#Time)
Define_Com Class(#Prim_Dat) Name(#DateTime)
#Label := #Time.Now.AsDisplayString( HHsMMsSS )
#Label2 := #DateTime.Now.AsLocalizedDateTime.Time.AsDisplayString( HHsMMsSS )
Endroutine
End_Com