Link | lp_date_UTCtimestamp |
Author | Bil Corry |
Category | Date |
Version | 8.5.x |
License | Public Domain |
Posted | 18 Apr 2006 |
Updated | 03 Dec 2007 |
More by this author... |
Returns number of seconds since 1/1/1970 for UTC/GMT timezone.
Requires [lp_date_stringToDate] [lp_date_localtoUTC] [lp_date_serverDST]
lp_date_UTCtimestamp; '
'; lp_date_UTCtimestamp:'1/1/2006 12:00:00 GMT'; // at GMT '
'; lp_date_UTCtimestamp:'1/1/2006 12:00:00'; // at your timezone
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
[ define_tag:'lp_date_UTCtimestamp', -description='Returns number of seconds since 1/1/1970 for UTC/GMT timezone.', -priority='replace', -optional='date', -copy; // tested against http://www.onlineconversion.com/unix_time.htm if: !(local_defined:'date'); local:'date' = date; /if; if: #date->type != 'date'; #date = lp_date_stringtodate: (string: #date); /if; #date = (lp_date_localtoUTC: #date); return: (#date - '1970-01-01 00:00:00 GMT')->Seconds; /define_tag; ]
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft