OwO-Network / DeepLX

Powerful Free DeepL API, No Token Required
https://ssa.sx/deeplx
MIT License
6.28k stars 507 forks source link

fix: 增加时区配置 #109

Closed QYG2297248353 closed 5 months ago

QYG2297248353 commented 5 months ago

修复默认时区问题

QYG2297248353 commented 5 months ago

临时解决方案: 挂载系统时区文件,因此如果是使用windows等系统将无法使用

version: "3.8"

services:
  deeplx:
    volumes:
      - /etc/localtime:/etc/localtime:ro
    # 其他配置
missuo commented 5 months ago

为什么要修改时区?

QYG2297248353 commented 5 months ago

日志统计不方便,要进行时间换算,不是合理的东八区,相差8小时。 排查问题总要在当前时间减去8小时

missuo commented 5 months ago

日志统计不方便,要进行时间换算,不是合理的东八区,相差8小时。

排查问题总要在当前时间减去8小时

你的 PR 不会被合并,且已经关闭。我现在在美国东部,我不会接受使用上海时区,你的代码只考虑了中国用户,显然这个项目不仅仅为中国用户使用。

请不要再提交有关于时区的 PR,否则会被立马关闭。

Your PR will not be merged and has been closed. I am now in the New York Timezone, and I will not accept the use of Shanghai time zone. Your code only considers Chinese users. Obviously, this project is not only for Chinese users.

Please do not submit any more PRs about the time zone, otherwise it will be closed immediately.

QYG2297248353 commented 5 months ago

面对全球用户应该给到合理的配置,TZ应该作为环境变量,为用户提供便利