damadmai
Forum Replies Created
-
Yes, please revert that changeset / read what I wrote and not just the code lines:
https://wordpress.org/support/topic/notification-e-mail-timezone
My code example undoed your calculation with $gmt_offset. (But just for the E-Mail notification) & did not change the sign!
So please omit the manual adding of 3600 seconds. Unix time is Unix time and should not be changed. Use date_i18n() for output accordingly as Viktor suggested. So no additional timezone setting just for Sucuri should be necessary, that would be more confusing than helpful I think.Your old function
datetime()was just fine. With this changeset applied the time shown in the audit log (admin.php?page=sucuriscan) gets wrong!Just changing += to -= has the same effect as your
else if!My suggestion in the beginning was just for the E-Mail generation. (Which gets wrong by -4 now)
No Problem. I’m wondering why no one else reported that. 🙂
I forgot to mention that the line
$local_time -= ( $gmt_offset * 3600 );subracts the time offset which was added in your functiondatetime(). I was “too lazy” to reimplementdatetime()without your manualgmt_offsetADDition.
So that has nothing to do with my timezone being +1, actually it’s currently +2!