Closed Tolsto closed 5 years ago
Hello,
thanks for pointing that out.
require 'tzinfo'
p begin ::TZInfo::Timezone.get('+11') rescue nil; end # ==> nil
p begin ::TZInfo::Timezone.get('+1100') rescue nil; end # ==> nil
p begin ::TZInfo::Timezone.get('UTC/+11') rescue nil; end # ==> nil
p begin ::TZInfo::Timezone.get('Etc/GMT-11') rescue nil; end # ==> #<TZInfo::DataTimezone: Etc/GMT-11>
require 'fugit'
p Fugit::VERSION # ==> '1.1.5'
p Fugit::Cron.parse('29 9 16 * * +11') # ==> nil
p Fugit::Cron.parse('29 9 16 * * +1100') # ==> #<Fugit::Cron:...>
p Fugit::Cron.parse('29 9 16 * * UTC/+11') # ==> nil
p Fugit::Cron.parse('29 9 16 * * Etc/GMT-11') # ==> nil
I can't find UTC/+11
in the list of tz database time zones and TZInfo doesn't know about it. If you have a need for it, please tell me. (By the way are you on Windows?)
That leaves me Etc/GMT-11
to enable.
Hello @Tolsto,
please tell me if the changes I made fix the issue for you.
If you really need UTC/+11
, please tell me why you need it.
Thanks in advance.
Thanks for the fast reply @jmettraux
You are right, UTC/+11
doesn't exist. Sorry for the bad example. I'm not on Windows but Linux.
Your new code works for me. However, only for negative offsets. Something like Etc/GMT+5
still doesn't work.
Hello @Tolsto,
my bad. The above commit should solve that.
Thanks for the rapid feedback you gave me.
Thank you, I can confirm that it works now. Do you already know when you'll publish the next release that will include this?
You're welcome.
I'm thinking about releasing tomorrow, along with an et-orbi accommodation for the same Etc/GMT+11
and friends. I hope that matches your schedule.
:+1:
Do you plan to support timezone offsets in the future? Currently, the following examples do not work: