ceylon-sdk
ceylon-sdk copied to clipboard
Use native implementation to get current time zone name and offset
Now that Ceylon has full support for native implementations, we can make use of native JVM and/or Javascript to get current time zone name and offset information from current platform.
Moving to 1.3
For offset we already do indirectly, currently we use system.timezoneOffset in our timeZone.system, or do you mean remove it from system ?
For name we dont have anything, but it possible to do like we do for offset..
I would like to do this issue, can you guide me @luolong about my doubts?
Yes, we currently use native information from system.timzoneOffset which falls back to native implementation.
This was initially done so simply because there was no proper way to have native implementations for other modules than ceylon.language.
Now that Ceylon 1.2 has full support for native implementations, we should not hesitate to use it.
But I don't understand what the advantage would be. It's the same, no?
well, for offset, we could keep using it -- no problems there
But we need more information like name of the current time zone for example, when we have fully functional rule based time zones...
OK but I would be perfectly happy adding that to the language module too.