create-an-issue icon indicating copy to clipboard operation
create-an-issue copied to clipboard

Support timezone

Open qianbinbin opened this issue 2 years ago • 1 comments

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!

qianbinbin avatar Sep 15 '21 03:09 qianbinbin

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.

eggplants avatar Jan 14 '22 19:01 eggplants

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

JasonEtco avatar Dec 23 '22 06:12 JasonEtco