Re: System Time Zone

2022-09-14 Thread Bob Sneidar via use-livecode
Well, IDEALLY I would like a way that does not involve a lookup list, but I do not think that is possible. I already downloaded an official list of time zones in the proper format, and their standard and savings time offsets. That should be close enough. Another thing I can do is in a settings p

Re: System Time Zone

2022-09-14 Thread Richmond via use-livecode
https://use-livecode.runrev.narkive.com/PhNgjt9Q/time-problems-with-daylight-saving On 14.09.22 19:01, Richmond wrote: From an offset from GMT it is easy enough with this: https://upload.wikimedia.org/wikipedia/commons/8/88/World_Time_Zones_Map.png to run up a listField with timezones and t

Re: System Time Zone

2022-09-14 Thread J. Landman Gay via use-livecode
That was my first thought too and I (erroneously) suggested the internet "time", which should have been "date". I found a ready-made lookup list and began experimenting. No go. You have to know whether the area is on daylight savings time because the offset changes. You also need to know the l

Re: System Time Zone

2022-09-14 Thread Richmond via use-livecode
From an offset from GMT it is easy enough with this: https://upload.wikimedia.org/wikipedia/commons/8/88/World_Time_Zones_Map.png to run up a listField with timezones and their countries as a sort of ad-hoc lookup table. On 14.09.22 18:38, matthias rebbe via use-livecode wrote: The original

Re: System Time Zone

2022-09-14 Thread Richmond via use-livecode
I am simply trying to present a solution that works: 1. 100% in LiveCode. 2. 100% cross-platform. Richmond. On 14.09.22 18:38, matthias rebbe via use-livecode wrote: The original poster does not want to have the offset, but the time zone country/city and he already had a solution with apple

Re: System Time Zone

2022-09-14 Thread Richmond via use-livecode
Ah: sorry, I had no idea (having come late to the party) that you were wanting to interact with iCal. That does look like a bit of a headache: https://icalendar.org/iCalendar-RFC-5545/3-2-19-time-zone-identifier.html Richmond. On 14.09.22 18:35, Bob Sneidar via use-livecode wrote: It's not d

Re: System Time Zone

2022-09-14 Thread matthias rebbe via use-livecode
The original poster does not want to have the offset, but the time zone country/city and he already had a solution with apple script. I provided a solution just with the shell function. > Am 14.09.2022 um 17:21 schrieb Richmond via use-livecode > : > > That seems a bit unnecessary as 'internet

Re: System Time Zone

2022-09-14 Thread Bob Sneidar via use-livecode
It's not dead easy from the perspective of iCalendar syntax. Zones are defined by text strings. I will need a lookup table for that. Bob S On Sep 14, 2022, at 08:21 , Richmond via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: That seems a bit unnecessary as 'internet date' produc

Re: System Time Zone

2022-09-14 Thread Richmond via use-livecode
That seems a bit unnecessary as 'internet date' produces a format that includes the GMT offset. So when I write this in the messageBox:  put the internet date I get: Wed, 14 Sep 2022 18:19:18 +0300 and, obviously, from the +0300 it is dead easy to work out my system time zone. Love, Richmon

Re: System Time Zone

2022-09-14 Thread matthias rebbe via use-livecode
Does your app has preferences the user can enter? Why not allow him to enter also the sudo password? You could then use that to execute the following shell command: put shell("echo | sudo -S /usr/sbin/systemsetup -gettimezone") replace with the password in preferences. No need to use Applescri

Re: System Time Zone

2022-09-14 Thread Bob Cole via use-livecode
Just for the sake of completeness, there is a way to get the time zone with AppleScript but it requires Administrator Privileges. The MacOS pops up a request to allow the “do as AppleScript” script to access the systemsetup function. That manual step will interfere with the flow of the program.

Re: System Time Zone

2022-09-08 Thread Bob Sneidar via use-livecode
You can get the timezone of a widget, get a list of ALL time zones, convert to and from universal time. There is no way it seems to geet the current time zone of the system. Bob S > On Sep 7, 2022, at 22:59 , Niggemann, Bernd via use-livecode > wrote: > > Bob Sneidar via use-livecode Wed,

Re: System Time Zone

2022-09-08 Thread Bob Sneidar via use-livecode
Returns PDT. I will now have to get a list of all time zone abbreviations and do a lookup table. Bob S On Sep 7, 2022, at 17:14 , Mark Wieder via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: osx: put word -2 of shell("date") ___ use-

Re: System Time Zone

2022-09-07 Thread Niggemann, Bernd via use-livecode
Bob Sneidar via use-livecode Wed, 07 Sep 2022 16:49:43 -0700 Isn't there some kind of function that will return the current system's time zone? Hi Bob, there is a timeZone library in LC, maybe that is of help. Please be aware that some entries in the timeZone library are deprecated. https://qu

Re: System Time Zone

2022-09-07 Thread J. Landman Gay via use-livecode
"The internet time" gives you the offset from Greenwich time. No city though. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com On September 7, 2022 6:50:09 PM Bob Sneidar via use-livecode wrote: Hi all. I am exploring the possibility o

Re: System Time Zone

2022-09-07 Thread Mark Wieder via use-livecode
On 9/7/22 16:47, Bob Sneidar via use-livecode wrote: It's the, "America/Los_Angeles" bit I am trying to find a way to grok. How can I extract that in LC? Isn't there some kind of function that will return the current system's time zone? linux: put the last word of shell("date") osx: put wor