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

全天事件的时间显示错误并希望时间的展示可以根据时区做相应的转换。/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
5 of 11 tasks
ShunCai opened this issue Nov 18, 2018 · 3 comments

Comments

@ShunCai
Copy link

ShunCai commented Nov 18, 2018

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
  • Link to demo site with this issue: N/A
  • Link(s) to source code or any usefull link(s): N/A

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:

  • Latest Master branch
  • Latest Release version
  • Old version

NexT Scheme:

  • All schemes
  • Muse
  • Mist
  • Pisces
  • Gemini

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 sli1989 added the Bug label Nov 18, 2018
@sli1989
Copy link
Collaborator

sli1989 commented Nov 18, 2018

Yes, for now

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

waiting for maintenance.

@stevenjoezhang
Copy link
Contributor

stevenjoezhang commented Dec 30, 2018

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

@ivan-nginx ivan-nginx changed the title 全天事件的时间显示错误并希望时间的展示可以根据时区做相应的转换。/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. 全天事件的时间显示错误并希望时间的展示可以根据时区做相应的转换。/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] Mar 4, 2019
tongluyang pushed a commit to tongluyang/hexo-theme-next that referenced this issue Nov 19, 2019
@lock
Copy link

lock bot commented Mar 10, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants