Timezone offset displayed incorrectly in Ruby
The eastern Australia timezone is UTC+10, but Ruby on Alpine 3.2 tells me it’s –10:
/ # cat /etc/issue
Welcome to Alpine Linux 3.2
Kernel \r on an \m (\l)
/ # setup-timezone -z /usr/share/zoneinfo/Australia/Sydney
/ # date -R
Thu, 16 Jul 2015 14:46:29 +1000
/ # ruby -e "puts Time.now"
2015-07-16 14:46:36 -1000
Compare this to Alpine 2.7:
/ # cat /etc/issue
Welcome to Alpine Linux 2.7
Kernel \r on an \m (\l)
/ # setup-timezone -z /usr/share/zoneinfo/Australia/Sydney
/ # date -R
Thu, 16 Jul 2015 14:45:52 +1000
/ # ruby -e "puts Time.now"
2015-07-16 14:45:56 +1000
Is this a Ruby issue? Or musl-related? Thank you for any input.
(from redmine: issue id 4450, created on 2015-07-16, closed on 2015-08-13)
- Changesets:
- Revision 8414beeb by Natanael Copa on 2015-08-13T10:03:46Z:
main/musl: fix struct tm.tm_gmtoff
ref #4450
- Revision 229c456f by Natanael Copa on 2015-08-13T12:29:59Z:
main/musl: fix struct tm.tm_gmtoff
fixes #4450
(cherry picked from commit 8414beebee8ee751a27f412d2318f0bcf66bf65b)