Activity: Timestamp wrong in Mail notification

Hello!

I’m using Activity in NC 10.0.1 and I can’t figure out how to correct the timestamp in mails.
The timestamp is stored in the database via epoch-seconds (UTC I think!?)
The WebUI show’s the correct time of an activity (MEZ/CET - Europe/Vienna) but in the mails the timestamp of the activity is wrong (one hour off) because it is UTC.

Local time: Tue 2016-12-06 12:36:46 CET
Universal time: Tue 2016-12-06 11:36:46 UTC
RTC time: Wed 2016-12-07 04:21:03
Time zone: Europe/Vienna (CET, +0100)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no

Any hints!?
Best regards!
Florian

The email system uses the timezone that is stored for each user in the oc_preferences table. Can you have a look for that value?

Thank you! Oder Dankeschön wäre einfacher :wink:

No value which seems to have something to do with timestamp:
All values for user test01 which is receiving the activity mails…

| test01 | activity | notify_email_comments | 0 |
| test01 | activity | notify_email_file_changed | 1 |
| test01 | activity | notify_email_file_created | 1 |
| test01 | activity | notify_email_file_deleted | 0 |
| test01 | activity | notify_email_file_restored | 0 |
| test01 | activity | notify_email_public_links | 0 |
| test01 | activity | notify_email_remote_share | 1 |
| test01 | activity | notify_email_shared | 1 |
| test01 | activity | notify_email_systemtags | 0 |
| test01 | activity | notify_setting_batchtime | 3600 |
| test01 | activity | notify_setting_self | 1 |
| test01 | activity | notify_setting_selfemail | 0 |
| test01 | activity | notify_stream_comments | 1 |
| test01 | activity | notify_stream_file_changed | 1 |
| test01 | activity | notify_stream_file_created | 1 |
| test01 | activity | notify_stream_file_deleted | 1 |
| test01 | activity | notify_stream_file_restored | 1 |
| test01 | activity | notify_stream_files_favorites | 0 |
| test01 | activity | notify_stream_public_links | 1 |
| test01 | activity | notify_stream_remote_share | 1 |
| test01 | activity | notify_stream_shared | 1 |
| test01 | activity | notify_stream_systemtags | 1 |
| test01 | core | lang | de |
| test01 | firstrunwizard | show | 0 |
| test01 | login | lastLogin | 1481050881 |
| test01 | settings | email | XYXYXYXYX@gmx.at |

UPDATE:
Inserted the TIMEZONE in the DB-Table…
| test01 | core | timezone | Europe/Vienna |

Timestamp in Mail is now correct! YES! But why is the entry missing!?
Cant edit each new User in the Database…

Right, seems like the code to set the timezone on login was removed lately. I will create an issue for it.

1 Like

Feel free to test the patch at https://github.com/nextcloud/server/issues/2562 and report back when it worked.

Will be fixed with 10.0.2 and 11