theme-next / hexo-theme-next

Elegant and powerful theme for Hexo.
https://theme-next.org
Other
8.17k stars 2.05k forks source link

全天事件的时间显示错误并希望时间的展示可以根据时区做相应的转换。/The time of the all-day event shows an error and hopes that the display of the time can be converted according to the time zone. [solved] #481

Closed ShunCai closed 5 years ago

ShunCai commented 6 years ago

I agree and want to create new issue


Expected behavior

  1. N/A
  2. N/A
  3. N/A

Actual behavior

Steps to reproduce the behavior

  1. 设置谷歌日历中的时区为中国。/Set the time zone in Google Calendar to China。
  2. 在Google日历中创建全天活动。/Create an all-day event in Google Calendar。
  3. 在Google日历中创建非全天活动。/Create a non-all day event in Google Calendar。
  4. 日程插件中的时间就会显示错误。/The time in the calendar plugin will display an error。
  5. 全天活动的时间会显示成无效日期。/The time of the all-day event will be displayed as an invalid date。
  6. 非全天事件的时间会跟实际时间不同。/The time of a non-all day event will be different from the actual time。
  7. 我查阅了Google Calendar API,当日程为全天事件时,事件时间返回的字段为date;反正,返回的的字段 为dateTime,如果针对于时间设置了时区,所设定的时区将返回到timeZone字段。/ I checked the Google Calendar API. When the schedule is an all-day event, the field returned by the event time is date; anyway, the returned field is dateTime. If the time zone is set for the time, the set time zone will be returned to the timeZone field.
  8. 希望事件的显示时间可以根据日历的时区或者事件的时区结合用户的时区来做显示。/ I hope that the display time of the event can be displayed according to the time zone of the calendar or the time zone of the event combined with the time zone of the user. image image

Node.js and NPM Information

v8.11.3
5.6.0

Package dependencies Information

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.8.0"
  },
  "dependencies": {
    "hexo": "^3.7.0",
    "hexo-generator-archive": "^0.1.5",
    "hexo-generator-calendar": "git://github.com/icecory/Hexo-Next-Plugins-Calendar.git#hexo",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-feed": "^1.2.2",
    "hexo-generator-index": "^0.2.1",
    "hexo-generator-searchdb": "^1.0.8",
    "hexo-generator-tag": "^0.2.0",
    "hexo-helper-live2d": "^3.1.0",
    "hexo-renderer-ejs": "^0.3.1",
    "hexo-renderer-marked": "^0.3.2",
    "hexo-renderer-stylus": "^0.3.3",
    "hexo-server": "^0.3.1",
    "hexo-symbols-count-time": "^0.4.4",
    "live2d-widget-model-koharu": "^1.0.5"
  }
}

Hexo Information

Hexo version

hexo: 3.8.0
hexo-cli: 1.1.0
os: Windows_NT 10.0.17134 win32 x64
http_parser: 2.8.0
node: 8.11.3
v8: 6.2.414.54
uv: 1.19.1
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.32.0
napi: 3
openssl: 1.0.2o
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c

Hexo Configuration

NexT Information

NexT Version:

NexT Scheme:

NexT Configuration:

calendar:
  enable: true
  calendar_id: *** # Your Google account E-Mail
  api_key: ***
  orderBy: startTime
  # offsetMax: 24 # Time Range
  # offsetMin: 4 # Time Range
  # timeZone:
  showDeleted: false
  singleEvents: true
  maxResults: 250

Other Information

@akkuman

sli1989 commented 6 years ago

Yes, for now

  1. The all-day event is not supported.
  2. The timeZone issue is also needed to optimized.

waiting for maintenance.

stevenjoezhang commented 5 years ago

@ShunCai 原来的_config.yml中有timeZone字段,看上去可以去掉。而且时区似乎并没有任何问题,确实是按照访问者的时钟显示的,与创建日程时的时区无关。 至于正确显示全天日程的问题,就比较麻烦了。这个按照创建者时钟的一天似乎比较合适,我会提交一个PR解决。

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.