User Tools

Site Tools


wiki:cumulusmx:webtags:datetime

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
wiki:cumulusmx:webtags:datetime [2025/11/01 11:11] – ↷ Page moved from playground:cumulusmx:webtags:datetime to wiki:cumulusmx:webtags:datetime Neilwiki:cumulusmx:webtags:datetime [2025/11/01 12:19] (current) Neil
Line 27: Line 27:
 | <#shortyear> | The current year as a 2-digit number. Example format: 09 (cannot use output format modifiers). | | <#shortyear> | The current year as a 2-digit number. Example format: 09 (cannot use output format modifiers). |
 | <#rollovertime> | The time that the logs rollover to the next day: 'Midnight', '9 am' or '10 am' | | <#rollovertime> | The time that the logs rollover to the next day: 'Midnight', '9 am' or '10 am' |
-| <#metdateyesterday> | <WRAP group>The previous meteorological date. The default format depends on the locale you use to run Cumulus +| <#metdateyesterday> | <WRAP group>The previous meteorological date. The default format depends on the locale you use to run Cumulus\\  
- +++ Note |
-++++ Note |+
 If you use midnight rollover, this returns same date as <#date>, but with a different default format.\\  If you use midnight rollover, this returns same date as <#date>, but with a different default format.\\ 
 If using a 9am/10am rollover: If using a 9am/10am rollover:
Line 37: Line 36:
 | <#yesterday> | Yesterday's date. | | <#yesterday> | Yesterday's date. |
 | <#update> | The date and time of the last web site update. | | <#update> | The date and time of the last web site update. |
-| <#timeJavaScript> | <wrap group>The JavaScript Date object contains the number of milliseconds since 00:00:00.000 UTC on 1st January 1970, that date and time is known as the UNIX Epoch. In JavaScript, you can use Math.floor(new Date().getTime()/1000.0) This getTime method returns the time in milliseconds. The web tag returns an integer (currently with 13 digits) representing the number of milliseconds since the UNIX epoch when the web tag was processed. It can be used in a script where you wish to re-express other times output by Cumulus MX into UTC (Coordinated Universal Time). Mac OS X uses 00:00:00.000 UTC on 1st January 2001 as the starting time and date for its millisecond count, so that is considerably lower.+| <#timeJavaScript> | <wrap group>The JavaScript Date object contains the number of milliseconds since 00:00:00.000 UTC on 1st January 1970, that date and time is known as the UNIX Epoch.\\  ++ Technical | In JavaScript, you can use Math.floor(new Date().getTime()/1000.0) This getTime method returns the time in milliseconds. The web tag returns an integer (currently with 13 digits) representing the number of milliseconds since the UNIX epoch when the web tag was processed. It can be used in a script where you wish to re-express other times output by Cumulus MX into UTC (Coordinated Universal Time). Mac OS X uses 00:00:00.000 UTC on 1st January 2001 as the starting time and date for its millisecond count, so that is considerably lower.
 Note that UTC is calculated using 9192631770 times a particular transition time for Caesium 133 as a basis for 1 second. GMT (Greenwich Mean Time) is calculated on the basis that 1 second is 1/86400 of the time taken for a whole (day) rotation of the Earth. UT1 (or solar time) is calculated from various space measurements. Periodically, leap seconds are added to UTC to realign it with UT1, but these leap seconds are not added to the count of milliseconds represented by this web tag. Note that UTC is calculated using 9192631770 times a particular transition time for Caesium 133 as a basis for 1 second. GMT (Greenwich Mean Time) is calculated on the basis that 1 second is 1/86400 of the time taken for a whole (day) rotation of the Earth. UT1 (or solar time) is calculated from various space measurements. Periodically, leap seconds are added to UTC to realign it with UT1, but these leap seconds are not added to the count of milliseconds represented by this web tag.
  
-Do be aware that some devices will use a 32 bit signed integer to represent this number, and that will stop working on 19 January 2038, the year 2038 problem for computing world.</wrap>|+Do be aware that some devices will use a 32 bit signed integer to represent this number, and that will stop working on 19 January 2038, the year 2038 problem for computing world.++</wrap>|
 | <#timeUnix> | Unix tracks the number of seconds since the UNIX epoch. So this web tag can be used when you do not want the millisecond accuracy of the previous web tag. Like previous web tag this relates to UTC, so see details for that tag to find out more. | | <#timeUnix> | Unix tracks the number of seconds since the UNIX epoch. So this web tag can be used when you do not want the millisecond accuracy of the previous web tag. Like previous web tag this relates to UTC, so see details for that tag to find out more. |
 | <#LastDataReadT> | The date/time data was last read from the station. | | <#LastDataReadT> | The date/time data was last read from the station. |
Line 46: Line 45:
 | <#recordsbegandate> | Date when records began.| | <#recordsbegandate> | Date when records began.|
 | <#DaysSinceRecordsBegan> | Day count since Cumulus records started. | | <#DaysSinceRecordsBegan> | Day count since Cumulus records started. |
-| <#DataDateTime>this reflects the current date time with respect to the data. Use this web tag in things like Custom MySQL INSERT statements to pick up the historic data's date/time rather than the current clock date/time. |+| <#DataDateTime>This reflects the current date time with respect to the data. Use this web tag in things like Custom MySQL INSERT statements to pick up the historic data's date/time rather than the current clock date/time. |
 </searchtable> </searchtable>
  
wiki/cumulusmx/webtags/datetime.txt · Last modified: by Neil