localtime - script and chart function

This function returns a timestamp of the current time from the system clock for a specified time zone.


LocalTime([timezone [, ignoreDST ]])

Return data type: dual


Argument Description

The timezone is specified as a string containing any of the geographical places listed under Time Zone in the Windows Control Panel for Date and Time or as a string in the form 'GMT+hh:mm'.

If no time zone is specified the local time will be returned.

ignoreDST If ignoreDST is -1 (True) daylight savings time will be ignored.

Examples and results:  

The examples below are based on the function being called on 2014-10-22 12:54:47 local time, with the local time zone being GMT+01:00.

Example Result

localtime ()

Returns the local time 2014-10-22 12:54:47.

localtime ('London')

Returns the local time in London, 2014-10-22 11:54:47.

localtime ('GMT+02:00')

Returns the local time in the timezone of GMT+02:00, 2014-10-22 13:54:47.

localtime ('Paris','-1')

Returns the local time in Paris with daylight savings time ignored, 2014-10-22 11:54:47.