Welcome, Guest
Please Login or Register.    Lost Password?

[Closed]Converted different time-zone to localtime
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: [Closed]Converted different time-zone to localtime
#16684
[Closed]Converted different time-zone to localtime 2 Years, 6 Months ago  
Friends on the Forum, Happy Valentine's Day!
Release a self-made skin. (in fact, it does not have any window. only use lua.)
The purpose of this skin is: Converted the events(/tasks) that happen on different time-zone to local time.
Hope you like it, and provide your valuable advice
File Attachment:
File Name: OffsetEvents.zip
File Size: 30800
anoob
Platinum Boarder
Posts: 500
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
Last Edit: 2013/03/06 12:43 By anoob.
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
#16687
Re:Converted different time-zone to local time 2 Years, 6 Months ago  
It's a good workaround until Rainy add an option for time zones.

I have a couple of question about it.
I don't get the idea of to create the event in a calendar and then copy to a temporal one. In this way, you need to create the event, open the manager and move the event to an existing calendar. Or I'm wrong?
Another thought I have is which is the need to use a skin to use something that doesn't need windows? Of course, it has the advantage of an easy installation.

Using only the lua file I copy it in the program/script folder (not the user one). Then, when a event is created in the calendar, it updates the event instead of creating a new one, removing the timezone operator to avoid mistakes. How I avoid the update one and again? creating a new item in the iCal data (X-RAINLENDAR-OFFSETTIME). This solution works only on Rainlendar.

Another possibility is to use this script in all calendars... and remove the exceptions (I didn't do any of those).

But this approach also have errors.
- I don't know how to change the option to show/hide the original time. (except modifying the ini)
- I can't trigger the event handler (redraw). (something related with the new "pending list" warning?). I need to refresh Rainlendar to read it again.
- The ICS shows that the timezone in the location was removed. But Rainlendar still shows it in the event dialog. Somehow it still shows the "previous location" data instead of the event data.

File Attachment:
File Name: offsetevents.zip
File Size: 2061
Jorge_Luis
Platinum Boarder
Posts: 792
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#16692
Re:Converted different time-zone to local time 2 Years, 6 Months ago  
In this way, you need to create the event, open the manager and move the event to an existing calendar You are right, it's my previous thought. Thanks for your idea.

which is the need to use a skin to use something that doesn't need windows? Of course, it has the advantage of an easy installation. Yes, it's just to easy to install.

- I don't know how to change the option to show/hide the original time. (except modifying the ini)
- I can't trigger the event handler (redraw). (something related with the new "pending list" warning?). I need to refresh Rainlendar to read it again.
- The ICS shows that the timezone in the location was removed. But Rainlendar still shows it in the event dialog. Somehow it still shows the "previous location" data instead of the event data.
- I also have no idea.
- I don't know why, but Rainlendar_SetEventHandler seem to can not be setting as global events, it must have set "Window".
- I am not understand the meaning.(i have no happen.)

Not important, but use your method, event can't be used again via edit it directly from dialog, must create a new one.

p.s. I make some changes.

File Attachment:
File Name: offsetevents01.zip
File Size: 2010
anoob
Platinum Boarder
Posts: 500
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
#16694
Re:Converted different time-zone to local time 2 Years, 6 Months ago  
The last line OffsetEvents_Initialize() calls the function. Commenting that line causes that the function will never be called. (as in this script from the holidays wiki.rainlendar.info/images/0/04/Holidays.lua)

The idea behind the strtimeoffset and the %%+ %%- was to replace e.g. "Taiwan, ROC(+8)" to "Taiwan, ROC". The double percent is because the function thinks that I'm using regexp. This would be useful if the option to keep the origin in the summary isn't checked.

I'm not fully understand about the reuse.

Yes, when the event is created, automatically changes from source time to local time. If you need to change the source time, one way is creating a new one. The other (more complex) is to manually remove the X-RAINLENDAR-OFFSETTIME line from the ics file... or ... maybe adding a new tag in the location, like "(RESET)" or "(--)", check it in the script and remove the line. Or simply when the "(--)" is added, the X-RAINLENDAR-OFFSETTIME check is bypassed, e.g: location "Taiwan, ROC(+8)" and start time "10:00" ... and then location "Taiwan, ROC(+8)(--)" and start time "15:00".

EDIT: pattern to find "(--)" would be "%(%-%-%)"
Jorge_Luis
Platinum Boarder
Posts: 792
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
Last Edit: 2012/02/16 18:00 By Jorge_Luis.Reason: Regular expresions
The administrator has disabled public write access.
 
#16698
Re:Converted different time-zone to local time 2 Years, 6 Months ago  
The last line OffsetEvents_Initialize() calls the function. Commenting that line causes that the function will never be called. Sorry, it's a mistake, because i still for use in a skin window.

The idea behind the strtimeoffset and the %%+ %%- was to replace e.g. "Taiwan, ROC(+8)" to "Taiwan, ROC". i think it's not necessary, because there is a variable "location" which get the name of LOCATION.

About "change the source time", now can be performed by checking "LOCATION:" whether there is.

About "Show/Hide Origin time", now i use "ShowLocation" for switching.

File Attachment:
File Name: offsetevents01-4bb5c7dfd731db6a9de5bd4729a65624.zip
File Size: 2081
anoob
Platinum Boarder
Posts: 500
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
Go to topPage: 1
get the latest posts directly to your desktop