Lasso Soft Inc. > Home


AuthorRick Draper
LicensePublic Domain
Posted05 Feb 2006
Updated05 Feb 2006
More by this author...


This tag was created to overcome a problem where events were stored on one server in GMT, but expected to be presented in the time zone applicable to the local time of the event.  ie. taking into account daylight saving / summer time. 

The tag accepts a single date/time in Lasso GMT format. 

An array of Daylight Saving / Summer Time start and finish dates is required in GMT format.  eg. Var:'VIC_DST'=(array: (map:(DST_End)=(04/01/2006 17:00:00 GMT), (DST_Start)=(10/01/2005 16:00:00 GMT)), (map:(DST_End)=(03/26/2005 17:00:00 GMT), (DST_Start)=(10/30/2004 16:00:00 GMT)), (map:(DST_End)=(03/27/2004 17:00:00 GMT), (DST_Start)=(10/25/2003 16:00:00 GMT)))

The relevant offsets from GMT for Standard and Summer Time are set as parameters.

This is my first tag, so all feedback and suggestions will be most welcome.

Sample Usage

	-Date_GMT=' '10/02/2005 02:00:00',
	-Format='%d %b %Y %h:%M%p');

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.



Iterate: #DST_Array, (Local: 'Date_Set');
	Local:'Start_GMT' = (#Date_Set->(Find:'DST_Start'));
	Local:'End_GMT' = (#Date_Set->(Find:'DST_End'));

	If:#Season_Set == 0;
		If:(Date_Difference: #Date_GMT, #Start_GMT, -Second) >= 0;
			#Season_Set = 1;
			If: (Date_Difference: #Date_GMT, #Start_GMT, -Second) >= 0 && (Date_Difference: #Date_GMT, #End_GMT, -Second) < 0;
				#Adjusted_Date = (Date_Add:#Date_GMT,-Hour=#DST_Offset);
				#Time_Zone = #DST_TZ;

Return:(Date_Format:#Adjusted_Date,-Format=#Format)+' '+#Time_Zone;


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