These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

Can get_iplayer have UK Local ISO Date/Times?

user-1923

I'm running get_iplayer 3.12.0 from a Windows 7 command prompt.

I noticed a few years ago that the ISO date/times fields when using the --info option do not take account of UK local time switching between Coordinated Universal Time (UTC) and British Summer Time (BST).

For example,
Code:
C:\>get_iplayer -i --pid b09tmxv2 | findstr /r "^available: ^firstbcast: ^expires: ^title:"
produces:

get_iplayer Output:

available:      2018-02-27T22:30:00+00:00
expires:        in 27 days 21 hours (2018-03-29T22:30:00+00:00)
firstbcast:     2018-02-27T22:25:00Z
title:          The Archiveologists: Series 1: Telecommunications Services for the 1990s
Here the expires field gives the expiry date/time in UTC although the UK standard time will be BST. Running the same command after 2018-03-25T01:00:00Z (when the UK switches from UTC to BST) the output will be different, with the expires field showing the UK standard time: 2018-03-29T23:30:00+01:00. Similar inconsistencies occur around the time in October when UK standard time switches from BST to UTC.

The output isn't wrong, but I'd prefer to see:

get_iplayer Output:

available:      2018-02-27T22:30:00+00:00
expires:        in 27 days 21 hours (2018-03-29T23:30:00+01:00)
firstbcast:     2018-02-27T22:25:00+00:00
title:          The Archiveologists: Series 1: Telecommunications Services for the 1990s
so I know at a glance that I've got until 11.30pm on 29th March to grab the programme, without having to 1. spot that the expiry date is not in UK standard time, 2. try to remember whether I'm supposed to add or subtract an hour to convert the specified date/time to local time, and 3. perform the calculation.

If the get_iplayer distribution of Perl can't handle this, there must be a Perl module available that can be passed a date/time in UTC which will then return the same date/time for the UK locale.

user-2

(02-03-2018, 01:32 AM)Running the same command after 2018-03-25T01:00:00Z (when the UK switches from UTC to BST) the output will be different, with the expires field showing the UK standard time: 2018-03-29T23:30:00+01:00. Similar inconsistencies occur around the time in October when UK standard time switches from BST to UTC.
No it won't. Expiration time is always UTC. The availability and first broadcast times are regurgitated in the --info display as they come from the BBC, but the expiration time is estimated by get_iplayer and must have a UTC base. Even if you don't pay attention to the time offset, the only effect is that for half the year you are given an apparent hour's grace. If you are that close to the deadline, you should be checking the iPlayer site anyway. The expiration times generated by get_iplayer could easily be off by an hour.

I have no interest in changing this, but if you want the expiration time to be displayed as a local time + offset with --info, feel free to submit a pull request. However, it can't just be UK local time - get_iplayer users could be in any timezone. Also, no non-core Perl modules can be used. I'm not going to inflict an additional dependency on packagers for such trivial functionality.

These forums are archived

See this post for further info