-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Backup Time defaults to UTC (can't get around it in 10.0.4) #27
Comments
The timestamp that php provides is taken for the backups. See: https://github.com/pbek/ownbackup/blob/develop/service/backupservice.php#L103 You need to configure the timezones in your server's |
echo date_default_timezone_get(); This script outputs 'America/New York' which us my timezone. The only way I could fix this in previous versions was to set the timezone in base.php. |
I don't know how to help you, ownCloud's own api is used to show the dates: https://github.com/pbek/ownbackup/blob/develop/templates/admin.php#L18 |
I looked into it further and the backup files are dated properly when they are created, but when I go to the ownCloud webgui Settings->Additional, the time stamp on the backup files is shown in UTC. |
where did you see that? |
Here is a listing of the files:
drwxr-xr-x 51 abc users 4096 Dec 15 01:00 1513317601
drwxr-xr-x 51 abc users 4096 Dec 15 02:15 1513322101
drwxr-xr-x 51 abc users 4096 Dec 15 03:30 1513326602
drwxr-xr-x 51 abc users 4096 Dec 15 04:45 1513331102
drwxr-xr-x 51 abc users 4096 Dec 15 06:00 1513335601
Here is what the gui shows:
![ownbackup2](https://user-images.githubusercontent.com/5514774/34045949-3876dabe-e179-11e7-8796-0ffc18d08912.png)
|
The gui uses ownCloud's own method to show dates, I've no clue why it doesn't show the desired date for you. |
Am I the only one that sees this issue? |
Currently I don't know of anyone but you... |
I ran a short test to determine where the time zone problem is occurring. I placed this code in a timezone.php file in the apps/ownbackup/directory When I browsed to the file with https://domain/owncloud/apps/ownbackup/timezone.php, the result was my time zone as expected. When I put this line "echo date_default_timezone_get();" in the backupservice.php, I got the timezone as "UTC". The php.ini timezone is getting lost in the ownbackup app. |
Thank you for your tests. Did the timezone get lost in ownbackup (I would wonder where that would happen) or ownCloud in general? |
I don't that much about how ownCloud works, but it appears that the timezone set in base.php (UTC) is the default and apps have to determine the local time and adjust. For example, the calendar app has to work in the local time zone. I was told not to change the base.php time zone because ownCloud needs to work in the UTC time zone. What I did notice is that the file name you use is the UTC time stamp, which is the right way to do it and the file time is adjusted in Linux for the time zone setting. That's why I saw the file time as correct. |
I have had this issue before where the backup file time is UTC. I previously got around this by changing the UTC time in base.php to my local time. Because of the integrity checks in 10.0.4, I can't make this change. How does one set the local time for backups?
The text was updated successfully, but these errors were encountered: