[lp_date_offsetToLocal]

Description

Link: [lp_date_offsetToLocal]
Author: Bil Corry
Category: Date
Version: 8.x
License: Public Domain
Posted: Feb. 26, 2006
Updated: Jan. 01, 0001
More by this author...
Returns the date at the local server timezone given a date with a specified timezone offset.

Requires [lp_date_stringtodate] [lp_date_offsetToUTC]

Parameters

-date date, required The date to convert to local server time.
-timezone_offset string, required The timezone offset. In the format +hhmm or -hhmm.

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.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[

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

none

Email:


Password:



Newest

Most Popular