DateTime->now usage
Hi, on testnig bug 22453 [1] I noticed that we do the wrong thing in many places, actually: $ git grep 'DateTime\->new' Do you agree we should be using dt_from_string instead? The consequences are for those having the DB server and/or the plack server running on some timezone and having koha-conf.xml point to another one. [1] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22453 -- Tomás Cohen Arazi Theke Solutions (http://theke.io) ✆ +54 9351 3513384 GPG: B2F3C15F
Hi, Yes, we must use dt_from_string. Note that some occurrences could stay as it: when the time_zone is passed. Cheers, Jonathan Le mar. 30 avr. 2019 à 12:59, Tomas Cohen Arazi <tomascohen@gmail.com> a écrit :
Hi, on testnig bug 22453 [1] I noticed that we do the wrong thing in many places, actually:
$ git grep 'DateTime\->new'
Do you agree we should be using dt_from_string instead? The consequences are for those having the DB server and/or the plack server running on some timezone and having koha-conf.xml point to another one.
[1] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22453
-- Tomás Cohen Arazi Theke Solutions (http://theke.io) ✆ +54 9351 3513384 GPG: B2F3C15F _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Yup, I believe we should be consistently using dt_from_string too. *Martin Renvoize* <https://www.ptfs-europe.com> Development Team Manager *Phone:* +44 (0) 1483 378728 *Mobile:* +44 (0) 7725 985 636 *Email:* martin.renvoize@ptfs-europe.com *Fax:* +44 (0) 800 756 6384 www.ptfs-europe.com Registered in the United Kingdom No. 06416372 VAT Reg No. 925 7211 30 The information contained in this email message may be privileged, confidential and protected from disclosure. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this email message in error, please email the sender at info@ptfs-europe.com On Tue, 30 Apr 2019 at 18:45, Jonathan Druart < jonathan.druart@bugs.koha-community.org> wrote:
Hi,
Yes, we must use dt_from_string. Note that some occurrences could stay as it: when the time_zone is passed.
Cheers, Jonathan
Le mar. 30 avr. 2019 à 12:59, Tomas Cohen Arazi <tomascohen@gmail.com> a écrit :
Hi, on testnig bug 22453 [1] I noticed that we do the wrong thing in
many places, actually:
$ git grep 'DateTime\->new'
Do you agree we should be using dt_from_string instead? The consequences
are for those having the DB server and/or the plack server running on some timezone and having koha-conf.xml point to another one.
[1] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22453
-- Tomás Cohen Arazi Theke Solutions (http://theke.io) ✆ +54 9351 3513384 GPG: B2F3C15F _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Great catch, Tomas. I totally agree. David Cook Systems Librarian Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Direct: 02 8005 0595 From: koha-devel-bounces@lists.koha-community.org <koha-devel-bounces@lists.koha-community.org> On Behalf Of Renvoize, Martin Sent: Wednesday, 1 May 2019 5:30 PM To: koha-devel <koha-devel@lists.koha-community.org> Subject: Re: [Koha-devel] DateTime->now usage Yup, I believe we should be consistently using dt_from_string too. Martin Renvoize <https://www.ptfs-europe.com> Development Team Manager Phone: +44 (0) 1483 378728 Mobile: +44 (0) 7725 985 636 Email: <mailto:martin.renvoize@ptfs-europe.com> martin.renvoize@ptfs-europe.com Fax: +44 (0) 800 756 6384 <https://www.ptfs-europe.com> www.ptfs-europe.com Registered in the United Kingdom No. 06416372 VAT Reg No. 925 7211 30 The information contained in this email message may be privileged, confidential and protected from disclosure. If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited. If you think that you have received this email message in error, please email the sender at info@ptfs-europe.com <mailto:info@ptfs-europe.com> On Tue, 30 Apr 2019 at 18:45, Jonathan Druart <jonathan.druart@bugs.koha-community.org <mailto:jonathan.druart@bugs.koha-community.org> > wrote: Hi, Yes, we must use dt_from_string. Note that some occurrences could stay as it: when the time_zone is passed. Cheers, Jonathan Le mar. 30 avr. 2019 à 12:59, Tomas Cohen Arazi <tomascohen@gmail.com <mailto:tomascohen@gmail.com> > a écrit :
Hi, on testnig bug 22453 [1] I noticed that we do the wrong thing in many places, actually:
$ git grep 'DateTime\->new'
Do you agree we should be using dt_from_string instead? The consequences are for those having the DB server and/or the plack server running on some timezone and having koha-conf.xml point to another one.
[1] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22453
-- Tomás Cohen Arazi Theke Solutions (http://theke.io) ✆ +54 9351 3513384 GPG: B2F3C15F _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org <mailto:Koha-devel@lists.koha-community.org> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
participants (4)
-
dcook@prosentient.com.au -
Jonathan Druart -
Renvoize, Martin -
Tomas Cohen Arazi