Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secureview Watermark Date is set to UTC and cannot change it #4364

Open
hoer20290ti opened this issue Dec 30, 2024 · 8 comments
Open

Secureview Watermark Date is set to UTC and cannot change it #4364

hoer20290ti opened this issue Dec 30, 2024 · 8 comments

Comments

@hoer20290ti
Copy link

Describe the bug
Watermark Date is Set To UTC even tho the timezone has been change

To Reproduce
Steps to reproduce the behavior:

  1. Activate Secure View and use Date tag
  2. Click/Open one of File that have secureview feature
  3. See the date

Expected behavior
The date should follow the server timezone

Screenshots
If applicable, add screenshots to help explain your problem.

Client details:

  • OS: Windows 10
  • Browser: Firefox, Chrome, Safari

Server details

Operating system: Ubuntu 24

Web server: Apache

Database: MySQL

PHP version: 8.3

Nextcloud version: 30.02

Version of Collabora Online Collabora Online Development Edition 24.04.11.1 8d0ad9add2

@juliusknorr
Copy link
Member

@hoer20290ti
Copy link
Author

Yes i did

Asia/Jakarta

@juliusknorr
Copy link
Member

Strange I just checked and for me the timezone is properly taken into account for the watermark:

'date' => (new \DateTime())->format('Y-m-d H:i:s'),

@juliusknorr juliusknorr added bug Something isn't working need to reproduce labels Dec 30, 2024
@hoer20290ti
Copy link
Author

no clue, but i might start set the timezone directly in the wopicontroller for now

@hoer20290ti
Copy link
Author

'date' => (new \DateTime('now', new \DateTimeZone('Asia/Jakarta')))->format('Y-m-d H:i:s')

I use this code

@juliusknorr
Copy link
Member

Can you share the output of php -i | grep timezone ?

@hoer20290ti
Copy link
Author

Default timezone => Asia/Jakarta
date.timezone => Asia/Jakarta => Asia/Jakarta

@juliusknorr
Copy link
Member

All right, so seems server does change this https://github.com/nextcloud/server/blob/7c59119c03c491f3534021b7011adfebf6e27b19/lib/base.php#L618

I do not see a reason why this would be done, so checking if anyone remembers a reason for this, but pushed a fix in #4366 to pick up the default_timezone setting from Nextclouds config.php.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants