[BLU/Officers] Boston Linux Meeting, Wednesday, August 16, 2017 - Federico Returns

John Abreau jabr at blu.org
Thu Aug 10 05:24:22 EDT 2017


Hi, Bill.

The script uses Data::ICal to generate the results, and I had hard-wired it
to use an offset of '-0500'.

I just modified it to check if a date was DST or not, and put either
'-0400' or '-0500' in a variable, then use that variable to specify the
offset:

However, instead of correcting the time, it's truncating it:

                    dtstart => Date::ICal->new(
                        day => $date[2], month => $date[1], year =>
$date[0],
                        hour => $start[0], min => $start[1], sec =>
$start[2],
                        offset => '-0500')->ical,

yields

    DTSTART:20170817T010000Z

but

                    dtstart => Date::ICal->new(
                        day => $date[2], month => $date[1], year =>
$date[0],
                        hour => $start[0], min => $start[1], sec =>
$start[2],
                        offset => $offset)->ical,

yields

    DTSTART:20170817Z

I'm not sure why.

To check for DST, I'm doing the following:

        my $time = timelocal(0, 0, 0, $st[3], $st[4], $st[5]);
        my ($dst) = (localtime($time))[8];
        $offset = $dst ? '-0400' : '-0500';

Any ideas why this is failing and what I need to do to fix it?

Attached is the cgi script, with database password modified.


On Wed, Aug 9, 2017 at 9:14 PM, Bill Ricker <bill.n1vux at gmail.com> wrote:

>
>
> On Wed, Aug 9, 2017 at 8:39 PM, Jerry Feldman <gaf.linux at gmail.com> wrote:
>
>> Says Sat Aug 19 at 8pm 👹
>>
>
> ​Saturday is not ​
>
> ​what i'm seeing
> I added http://blu.org/cgi-bin/calendar.ics  to my Google Calendar;
> that version says 9pm EDT (or 17th, 01Z ) :
>
> $ wget -O - --quiet http://blu.org/cgi-bin/calendar.ics
>
> ...
>
> BEGIN:VEVENT
>> CATEGORIES:BLU\;Linux\;UNIX\;LUG\;User Group
>> CLASS:PUBLIC
>> DESCRIPTION:Federico tells us what he's been working on in the past
>> year\n\
>>  nDetails at http://blu.org/cgi-bin/calendar/2017-aug
>> DTEND:20170817T020000Z
>> DTSTAMP:20170809T210640Z
>> *DTSTART:20170817T010000Z*
>> LOCATION:MIT Building E-51\, Room 315
>> SUMMARY:Federico Returns
>> UID:201708092106401502327200.8718800 at cheyenne.blu.org
>> END:VEVENT
>
> ...
>>
>
> To state the obvious,
> T0100Z would be 8pm in Winter EST,
> but is 9pm in Summer EDT.
>
> Linked BLU event page ​says 8pm on correct date.  http://blu.org/cgi-bin/
> calendar/2017-aug
>
>
> _______________________________________________
> Officers mailing list
> Officers at blu.org
> http://lists.blu.org/mailman/listinfo/officers
>
>


-- 
John Abreau / Executive Director, Boston Linux & Unix
Email jabr at blu.org / WWW http://www.abreau.net / PGP-Key-ID 0x920063C6
PGP-Key-Fingerprint A5AD 6BE1 FEFE 8E4F 5C23  C2D0 E885 E17C 9200 63C6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blu.org/pipermail/officers/attachments/20170810/29ea725a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calendar.ics
Type: text/calendar
Size: 2680 bytes
Desc: not available
URL: <http://lists.blu.org/pipermail/officers/attachments/20170810/29ea725a/attachment.ics>


More information about the Officers mailing list