Lasso Soft Inc. > Home

[lp_date_offsetToLocal]

Linklp_date_offsetToLocal
AuthorBil Corry
CategoryDate
Version8.x
LicensePublic Domain
Posted26 Feb 2006
Updated26 Feb 2006
More by this author...

Description

Returns the date at the local server timezone given a date with a specified timezone offset.

Requires [lp_date_stringtodate] [lp_date_offsetToUTC]

Sample Usage

(lp_date_offsetToLocal: (date:'2/20/2006 7:00:00'), '-0500'); // returns 02/20/2006 04:00:00 for server local time offset of -0800

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.

[

define_tag:'lp_date_offsetToLocal',
	-description='Returns the date at the local server timezone given a date with a specified timezone offset.',
	-priority='replace',
	-required='date',-copy,
	-required='timezone_offset';

	if: #date->type != 'date';
		#date = lp_date_stringtodate: (string: #date);
	/if;

	return: (lp_date_UTCtoLocal: (lp_date_offsetToUTC: #date, #timezone_offset));

/define_tag;

]

Related Tags

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft