Re: beatitude scheduled time problems

 
From: "Mariano Absatz - gmail" <el.baby@PROTECTED>
Date: July 12th 2012
For me, having a 24 hour clock would be great. Argentina (and a lot of other countries) is used to a 24 hour clock (and most of the people have a hard time guessing if 12:00AM is either noon or midnight) :)

On Mon, Mar 12, 2012 at 9:10 PM, Justin J <justin@PROTECTED> wrote:

On Mar 12, 2012, at 5:15 PM, Justin J wrote:
> Anyways, I can recreate your problem - it probably has to do with this method in dada/DADA/MailingList/Schedules.pm. It turns the data you set in the form into something that time() would return:


I can't full explain it, but if I change this one line:

   my $hour       = $q->param('mail_hour')   || 0;

to,

   my $hour       = $q->param('mail_hour')   || 12;

that mysterious (gained an hour) problem goes away.

The underlying problem is probably that I'm trying to work with 12 hour clock, instead of a 24 hour clock and that makes things very much convoluted.

--

Justin J: Lead Dadaist.
url:      http://dadamailproject.com
email:    justin@PROTECTED

On Mar 12, 2012, at 5:15 PM, Justin J wrote:

>
>
> On Mar 12, 2012, at 5:32 AM, Mariano Absatz - gmail wrote:
>> I also have my crontab file with environment variables to that effect and, other than the bug described, the site AND crontab do work OK with Buenos Aires' times.
>
> Hmm, I didn't know you could set environmental variables in a cronjob (except for, MAILTO, which I'm not sure is really a env var) - I'm still not quite sure, but it's not going to set for the cronjob for Beatitude, since the cronjob will just start an HTTP process, which will have its own environment.
>
>
> Anyways, I can recreate your problem - it probably has to do with this method in dada/DADA/MailingList/Schedules.pm. It turns the data you set in the form into something that time() would return:
>
>
>
> sub mailing_date {
>
>       my $self = shift;
>       my $q    = shift;
>
>    my $min        = $q->param('mail_minute') || 0;
>    my $hour       = $q->param('mail_hour')   || 0;
>    my $mday       = $q->param('mail_day')    || 1;
>    my $mon        = $q->param('mail_month')  || 0;
>    my $year       = $q->param('mail_year')   || 0;
>    my $mail_am_pm = $q->param('mail_am_pm')  || 'am';
>
>    # This is a little hacky...
>    if ( $mail_am_pm eq 'pm' ) {
>
>        # But - if the hour is, "12"
>        # 12 + 12 is, "24" - not, "0' and not just, "12"
>        if ( $hour != 12 ) {
>            $hour += 12;
>        }
>    }
>    elsif ( $mail_am_pm eq 'am' ) {
>        if ( $hour == 12 ) {
>            $hour = 0;
>        }
>    }
>
>    $min = int($min);
>    require Time::Local;
>    my $time = Time::Local::timelocal( 0, $min, $hour, $mday, $mon, $year );
>    return $time;
>
> }
>
>
> I bet the bug is in the, "am" and "pm" check. Working with a 24 hour clock would be a ton simpler,
>
>
>
>
> --
>
> Justin J: Lead Dadaist.
> url:      http://dadamailproject.com
> email:    justin@PROTECTED
>
> On Mar 12, 2012, at 5:32 AM, Mariano Absatz - gmail wrote:
>
>> I don't think so...
>>
>> Where I live DST has not been applied for some time. The site, however, is shared hosted in DreamHost and I think they use Pacific Time and adjust DST correspondingly.
>>
>> However, I have a .htaccess file in my dada cgi folder with a line to configure the timezone as my home zone like this:
>>
>> SetEnv TZ America/Argentina/Buenos_Aires
>>
>> I also have my crontab file with environment variables to that effect and, other than the bug described, the site AND crontab do work OK with Buenos Aires' times.
>>
>> This is my crontab:
>>
>> MAILTO=el.baby@PROTECTED
>> TZ="America/Buenos_Aires"
>> LANG="en_US.UTF-8"
>> LANGUAGE="en_AR:en_US:en_GB:en"
>> LC_TIME="en_GB.UTF-8"
>>
>> # m                     h               d               m               w               command
>>
>> # auto pickup mailing list (cada 5 minutos)
>> #3-59/5         *               *               *               *               /usr/bin/curl -s --get --data verbose=0 --url http://mailing.juanabsatz.com/admin/dada/extensions/auto_pickup.pl
>> # mailing monitor (cada 5 minutos)
>> 3-59/5          *               *               *               *               /usr/bin/curl -s --get --data run=1\;passcode=\;verbose=0 --url http://mailing.juanabsatz.com/admin/dada/plugins/mailing_monitor.cgi
>> # scheduled mailing (cada 10 minutos)
>> 0-59/10         *               *               *               *               /usr/bin/curl -s --get --data run=1\;passcode=\;verbose=0 --url http://mailing.juanabsatz.com/admin/dada/plugins/scheduled_mailings.pl
>>
>> # vim: ts=4
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Mar 12, 2012 at 04:00, Justin J <justin@PROTECTED> wrote:
>>
>> Randomly, does this have anything to do with Daylight Savings?
>>
>> On Mar 10, 2012, at 12:19 PM, Mariano Absatz - gmail wrote:
>>> I go to Beatitude's schedule list and I see the new entry like: "Sun Mar 11 00:00:00 2012", OK.
>>>
>>> However, if I click on it to edit the entry, the schedule now says: "March - 11th - 2012 - 1 : 00 - AM" (that is, Beatitude probably thought I might prefer the message to be sent at 1:00 AM rather than midnight). If I don't save the schedule, it stays as I wrote it (midnight). However, if I change anything (not touching the time schedule), and save the entry, it now says: "Sun Mar 11 01:00:00 2012", not what I intended.
>>
>>
>> --
>>
>> Justin J: Lead Dadaist.
>> url:      http://dadamailproject.com
>> email:    justin@PROTECTED
>>
>> On Mar 10, 2012, at 12:19 PM, Mariano Absatz - gmail wrote:
>>
>>> Hi Justin,
>>>
>>> I just upgraded my pro dada from 4.5.2 to 4.9.1 and it was a snap. I only had to fiddle with a couple of changes I had manually made to some of the source files.
>>>
>>> Anyway, this is not what I'm here for... I noticed a problem with the scheduled times in beatitude (and it's been here at least from 4.3.0, when I started using beatitude).
>>>
>>> I think that when you edit an existing schedule under certain scheduled time conditions, Beatitude changes the scheduled time by itself. If you make some changes (not involving the scheduled time) and save them, the scheduled time will change to what Beatitude put there.
>>>
>>> It may be an excess on Beatitude's personality... maybe it's good to have software with a personality, but, nonetheless, it is an annoyance (well, most of my friends also have annoyances, and that's part of THEIR personality, right?) :-)
>>>
>>> To the point:
>>>
>>> CASE 1 - MIDNIGHT SCHEDULE
>>>
>>> I create a new entry in Beatitude and schedule it to start on midnight between Saturday March 10th and Sunday March 11th (so, the schedule says: "March - 11th - 2012 - 12 : 00 - AM").
>>>
>>> BTW, I'd LOVE to be able to use a 24h clock setting for this.
>>>
>>> I go to Beatitude's schedule list and I see the new entry like: "Sun Mar 11 00:00:00 2012", OK.
>>>
>>> However, if I click on it to edit the entry, the schedule now says: "March - 11th - 2012 - 1 : 00 - AM" (that is, Beatitude probably thought I might prefer the message to be sent at 1:00 AM rather than midnight). If I don't save the schedule, it stays as I wrote it (midnight). However, if I change anything (not touching the time schedule), and save the entry, it now says: "Sun Mar 11 01:00:00 2012", not what I intended.
>>>
>>> CASE 2 - ONE MINUTE TO MIDNIGHT SCHEDULE
>>>
>>> I create a new entry in Beatitude and schedule it to start one minute before midnight between Saturday March 10th and Sunday March 11th (so, the schedule says: "March - 10th - 2012 - 11 : 59 - PM").
>>>
>>> I go to Beatitude's schedule list and I see the new entry like: "Sat Mar 10 23:59:00 2012", OK.
>>>
>>> However, if I click on it to edit the entry, the schedule now says: "March - 10th - 2012 - 11 : 59 - AM" (that is, Beatitude probably thought I might prefer the message to be sent one minute before noon rather than midnight). If I don't save the schedule, it stays as I wrote it (midnight). However, if I change anything (not touching the time schedule), and save the entry, it now says: "Sun Mar 10 11:59:00 2012", not what I intended.
>>>
>>>
>>>
>>> FWIW, I noticed case 1 long ago (using 4.3.0 and 4.5.2); case 2 I just tested today with 4.9.1.
>>>
>>> Regards.
>>> --
>>> Mariano Absatz - El Baby
>>> www.clueless.com.ar
>>>
>>>
>>> Post:
>>> mailto:dadadev@PROTECTED
>>>
>>> Unsubscribe:
>>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/u/dadadev/
>>>
>>> List Information:
>>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/list/dadadev
>>>
>>> Archive:
>>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/archive/dadadev
>>>
>>> Developer Info:
>>> http://dev.dadamailproject.com
>>>
>>> Mailing List Powered by Dada Mail
>>>
>>
>>
>>
>> --
>>
>> * Post:
>> mailto:dadadev@PROTECTED
>>
>> * Unsubscribe:
>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/u/dadadev
>>
>> * List Information:
>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/list/dadadev/
>>
>> * Archive:
>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/archive/dadadev
>>
>> Developer Info:
>> http://dev.dadamailproject.com
>>
>> Mailing List Powered by Dada Mail
>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/what_is_dada_mail/
>>
>>
>>
>> --
>> Mariano Absatz - El Baby
>> www.clueless.com.ar
>>
>>
>> Post:
>> mailto:dadadev@PROTECTED
>>
>> Unsubscribe:
>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/u/dadadev/
>>
>> List Information:
>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/list/dadadev
>>
>> Archive:
>> http://dadamailproject.com/cgi-bin/dada/mail.cgi/archive/dadadev
>>
>> Developer Info:
>> http://dev.dadamailproject.com
>>
>> Mailing List Powered by Dada Mail
>>
>
>
>
> --
>
> * Post:
> mailto:dadadev@PROTECTED
>
> * Unsubscribe:
> http://dadamailproject.com/cgi-bin/dada/mail.cgi/u/dadadev
>
> * List Information:
> http://dadamailproject.com/cgi-bin/dada/mail.cgi/list/dadadev/
>
> * Archive:
> http://dadamailproject.com/cgi-bin/dada/mail.cgi/archive/dadadev
>
> Developer Info:
> http://dev.dadamailproject.com
>
> Mailing List Powered by Dada Mail
> http://dadamailproject.com/cgi-bin/dada/mail.cgi/what_is_dada_mail/



--

* Post:
mailto:dadadev@PROTECTED

* Unsubscribe:
http://dadamailproject.com/cgi-bin/dada/mail.cgi/u/dadadev

* List Information:
http://dadamailproject.com/cgi-bin/dada/mail.cgi/list/dadadev/

* Archive:
http://dadamailproject.com/cgi-bin/dada/mail.cgi/archive/dadadev

Developer Info:
http://dev.dadamailproject.com

Mailing List Powered by Dada Mail
http://dadamailproject.com/cgi-bin/dada/mail.cgi/what_is_dada_mail/



--
Mariano Absatz - El Baby
www.clueless.com.ar


Post:
mailto:[list_settings.discussion_pop_email]

Unsubscribe:
https://dadamailproject.com/cgi-bin/dada/mail.cgi/u/dadadev/

List Information:
[PROGRAM_URL]/list/[list_settings.list]

Archive:
[PROGRAM_URL]/archive/[list_settings.list]

Developer Info:
http://dev.dadamailproject.com

  • This mailing list is a public mailing list - anyone may join or leave, at any time.
  • This mailing list is a group discussion list (unmoderated)
  • Start a new thread, email: dadadev@dadamailproject.com

This is the developer discussion mailing list for Dada Mail.

If you are just looking for support Dada Mail, consult the message boards at:

https://forum.dadamailproject.com

Documentation for Dada Mail:

https://dadamailproject.com/d

Specifically, see the Error FAQ:

https://dadamailproject.com/d/FAQ-errors.pod.html

To post to this list, send a message to:

mailto:dadadev@dadamailproject.com

All subscribers of this list may post to the list itself.

Topics that are welcome:

  • Constructive critiques on the program (I like, "x", but, "y" needs some work - here's an idea on how to make this better...)
  • Bug/Error reports
  • Bug fixes
  • Request For Comments on any changes to the program
  • Help customizing Dada Mail for your own needs
  • Patches
  • Language Translations
  • Support Documentation/Doc editing, FAQ's, etc.
  • Discussion of any changes that you would like to be committed to the next version of Dada Mail -

Dada Mail is on Github:

https://github.com/justingit/dada-mail/

If you would like to fork, branch, send over PRs, open up issues, etc.

Privacy Policy:

This Privacy Policy is for this mailing list, and this mailing list only.

Email addresses collection through this mailing list are used explicitly to work within this email discussion list.

We only collect email addresses through our Closed-Loop Opt-In system.

We don't use your email address for any other purpose.

We won't be sharing your email address with any other entity.

Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.

All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.

All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.