Re: tv_grab_sd_json: ISO8601

Kevin Groeneveld <[email protected]>
Newsgroups gmane.comp.tv.xmltv.devel
Message-ID <CABF+-6V0u3AFYqs+FBXqV3ZU2+r06crD+yw5hwnM0JHXZ7VLCg@mail.gmail.com>
On Sun, Jun 5, 2016 at 3:31 AM, <[email protected]> wrote:

> Is there any particular reason for using ISO8601 in this grabber?


Because this is pretty much the first Perl program I have ever written and
I didn't know anything about parsing dates in perl?  The SD JSON data uses
ISO8601 date formats so I probably googled "perl ISO8601" and
DataTime::Format::ISO8601 was the first hit that seemed like the right
thing to do.


> DateTime::Format::ISO8601 has a lot more (compile-time) dependencies than
> DateTime::Format::DateParse and is therefore harder to install on older
> machines. :-(
>
> If you don't need the extra power of ISO8601 then wouldn't DateParse do
> the job?
>

I don't even know what extra power the DateTime::Format::ISO8601 module has
compared to DateTime::Format::DateParse.  Looking at the docs very quickly
didn't really clue me in either.

I tried replacing the three occurrences of
"DateTime::Format::ISO8601->parse_datetime" with
"DateTime::Format::DateParse->parse_datetime".  This caused the
previously-shown date to be off in some cases.  I assume this could
probably be fixed without too much effort.

What do others think?  Would it be better to use
DateTime::Format::DateParse if possible?


Kevin

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e

_______________________________________________
xmltv-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xmltv-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.