[c5_unixtimestamp]

Description

Link: [c5_unixtimestamp]
Author: Jason Huck
Category: Date
Version: 8.x
License:
Posted: Jan. 16, 2006
Updated: Jan. 01, 0001
More by this author...
Returns the current unix timestamp (milliseconds since Jan 01, 1970 GMT).

Parameters

none


Sample Usage

[c5_unixtimestamp]
						

Source Code

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.
1
2
3
4
5
6
7
8
9
10
11
define_tag(
	'unixtimestamp',
	-namespace='c5_',
	-description='Returns the current unix timestamp (milliseconds since Jan 01, 1970 GMT).'
);
	local('startTime') = date('1970-01-01 00:00:00 GMT');
	local('out') = date_localtogmt(#startTime)->difference(date, -second);
	date->dst ? #out -= 3600;
	return(#out);
/define_tag;

 

Related Tags



Comments

08/11/2008, Robert Newcomb
Doesn't work for me in 8.1
Though I placed the .inc file in where indicated, and restarted Lasso, a call to the tag returns an error, that the tag is unknown. Ideas on what to look for?
03/17/2006, Jason Huck
Works here.
I even downloaded a fresh copy to verify. Perhaps it has something to do with locale?
03/16/2006, Pier Kuipers
Doesn't seem to work
Sorry Jason, when I try to run this tag I get an error: No tag, type or constant was defined under the name null->difference with arguments: array: (03/16/2006 15:54:55), (-second) at: unixtimestamp Just thought I'd try your tag before adding my own :-) Pier
Email:


Password:



Newest

Most Popular