JasonEtco / create-an-issue

A GitHub Action for creating a new issue from a template file.
MIT License
267 stars 83 forks source link

Support timezone #105

Closed qianbinbin closed 1 year ago

qianbinbin commented 3 years ago

Hi Jason, I have a question, since Github action schedule doesn't support timezone, users around the world have to make some offset for UTC. However, {{ date | date('dddd, MMMM Do') }} only use UTC+-0. Is there any way to get the right date? For example, for timezone UTC+8, I use 0 23 * * * to schedule at 7:00 everyday, but the date I get is "yesterday". Thanks in advance!

eggplants commented 2 years ago

but the date I get is "yesterday".

Same.

I tried to specify TZ (my timezone is Asia/Tokyo) to env of JasonEtco/create-an-issue, but it ignored TZ. In src/action.ts he uses Date.now() to get a present date info. It usually respects TZ. But not worked... I don't understand why.

JasonEtco commented 1 year ago

You'll have to check within nunjucks-date-filter, which uses moment.js to parse and format the date.