roleoroleo / yi-hack-MStar

Custom firmware for Yi 1080p camera based on MStar platform
GNU General Public License v3.0
830 stars 110 forks source link

v0.4.9 recorded video folders datetime are changed to UTC time instead of using local-time #502

Closed denven closed 2 months ago

denven commented 1 year ago

Upgraded from v0.4.7 to the latest v0.4.9 from Web UI, the upgrade was very smooth and all the configs were kept,

however, when I checked the recorded folders, I found that recorded directory names don't follow the timezone's local time.

Timezone setting: PST8PDT,M3.2.0,M11.1.0 , obviously it has an 8 hours jump which uses the UTC-0 time to create folders.

image

denven commented 1 year ago

To mention that, I tried the Home Assistant with yihack integration, and I remember that the folder's time shown in the media view is correct. But currently, I have uninstalled the HA and am not able to paste a screenshot here.

denven commented 1 year ago

I don't know if it is caused by this change

denven commented 1 year ago

It seems it's an intentional change to use GMT(UTC-0) time to name the folders.

However, I don't think it is convenient if you download or store the video files in some other storage since the video files don't have a timestamp on them, we have to convert them by ourselves.

For me, when I use the OneDrive uploader to upload files to the storage, the folders seem to be named in the future time, and it's not easy to identify.

denven commented 1 year ago

I found a new command set_tz_offset and don't know when we need it, and I found the auto-loaded shell script runs with an empty TZ value instead of the user-set timezone string.

Anyway, I've written some code to create the local-time-named folders on OneDrive by converting the UTC time from the original folder names in order to find them easily.

Then this issue can be closed if no other side-effect exists.

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.