macMikey / LCB-missing-manual

I'm trying to learn LCB, again, but the docs are thin.
MIT License
4 stars 4 forks source link

system time zone lib #30

Open macMikey opened 1 year ago

macMikey commented 1 year ago

There was a discussion on the use list about the system time zone. i wonder if we have native api's that would be hookable, and a good example for everyone.

mwieder commented 1 year ago

There's a crossplatform timezone library already. Mark Waddingham just pointed this out to me last week as part of an answer to a different question.

macMikey commented 1 year ago

mark, i heard that comment, too. do you have more info on it?

mwieder commented 1 year ago

I was wondering how to attach a binary file to an extension and Mr Waddingham pointed me to the timezone library which has the necessary binaries in a "code" subfolder (and appropriate platform subfolders under that). As far as the tz library itself, you can't automatically determine your local timezone, but once you've got it you can convert to UTC, perform calculations, and convert back to local time again. The dictionary lists three functions in the library.

BerndN commented 1 year ago

The timezone library uses some outdated timezones. https://quality.livecode.com/show_bug.cgi?id=23012

macMikey commented 1 year ago

fun