Or Cohen
2010-08-10 19:52:18 UTC
Hello all,
A small perl question.
I want to close that annoying bug (#2967298) which caused by (lazy me)
implementing a work around to find out what is the current time-zone in
Israel.
Basically, the programmes start times that the grabber is scraping are
matching the current time-zone in Israel (which is logical). I need to put
this time-zone in back into the programme details.
My problem is, how do I know what is the current time-zone in Israel (i.e.
the TZ site is displaying)?
strftime('%z') returns the time zone, but this would cause the programme
listing in a desired client (mythtv, xbmc, etc.) not display the programme
at the correct date/time for machines that are configured with a time zone
other then an Israeli one.
There must be something I'm missing here.
I saw DateTime package allows one to start an object with a desired
time-zone other than what is configured in the env., for example:
use DateTime;
$dt = DateTime->new(year => $show_year, month => $show_month, day =>
$show_day, time_zone => 'Asia/Jerusalem');
$tz = $dt->strftime('%z');
But do I really need to use this package just to get the time-zone in
Israel?
A small perl question.
I want to close that annoying bug (#2967298) which caused by (lazy me)
implementing a work around to find out what is the current time-zone in
Israel.
Basically, the programmes start times that the grabber is scraping are
matching the current time-zone in Israel (which is logical). I need to put
this time-zone in back into the programme details.
My problem is, how do I know what is the current time-zone in Israel (i.e.
the TZ site is displaying)?
strftime('%z') returns the time zone, but this would cause the programme
listing in a desired client (mythtv, xbmc, etc.) not display the programme
at the correct date/time for machines that are configured with a time zone
other then an Israeli one.
There must be something I'm missing here.
I saw DateTime package allows one to start an object with a desired
time-zone other than what is configured in the env., for example:
use DateTime;
$dt = DateTime->new(year => $show_year, month => $show_month, day =>
$show_day, time_zone => 'Asia/Jerusalem');
$tz = $dt->strftime('%z');
But do I really need to use this package just to get the time-zone in
Israel?