Hi all
This is the first flow that I'm sharing
I just converted the NOAA code from the twilight.xls file you can find on the internet
I've checked it few times and it's working fine for me
You need to change two parameters
Both of theme under Twilight Base --> Split Date
The first one is timezone, just change it to whatever timezone you need
The second one is dlstime (day light saving time) where 0 is no and 1 is yes
At the end of the base flow it will check if the flow was executed automaticly or manualy
In case it is executed automaticly it will save the times to global variables
And if manually it will show a message box with all the details
Very important!!!
You can execute only the base flow
If you'll try to execute any other flow that included it will run into an error about null values
Hope you enjoy it
http://automagic4android.com/flow.php?i ... c6b82d3156
Best regards to all
Twilight
Moderator: Martin
Re: Twilight
Couldn't figure it out how to enter 0530 timezone.
Edit: got it. It will be 5.5
Edit2: following code can be used to set timezone and dlstime
Edit: I have created a script function using noaa excel and Win1Sec Variable used by Elkanah
Edit: got it. It will be 5.5
Edit2: following code can be used to set timezone and dlstime
Code: Select all
cal = callJavaStaticMethod("java.util.Calendar", "getInstance()");
callJavaMethod(cal, "java.util.Calendar", "setTimeInMillis(long)", value);
timezone = callJavaMethod(cal, "java.util.Calendar", "get(int)", getJavaStaticField("java.util.Calendar", "ZONE_OFFSET")) / 3600000.;
if (callJavaMethod(callJavaMethod(cal, "java.util.Calendar", "getTimeZone()"), "java.util.TimeZone", "inDaylightTime(java.util.Date)", callJavaConstructor("java.util.Date", "Date()")))
{dlstime = 1}
else {dlstime = 0}
- Attachments
-
- flow_Twilight_20200126_091810.xml
- (7.37 KiB) Downloaded 1277 times
Last edited by anuraag on 26 Jan 2020 03:50, edited 2 times in total.