**Is your feature request related to a problem? Please describe.**
Iam using `hexo` framework.
Hexo output time string when used format `2024-01-21T06:34:03.845Z` is wrong hour. the result is `2024-01-21T16:54:43+07:00`

i've tried changing config date format, but not working.

this also not work

**Describe the solution you'd like**
I want print custom date format like `2024-01-21T13:29:27+07:00`
Discussion: https://github.com/estruyf/vscode-front-matter/discussions/735
Related forum:
- https://stackoverflow.com/questions/19648688/moment-js-returning-wrong-date
<!-- github-sync-id:2092446758 -->
If you want to set it for all your date fields, you can use the frontMatter.taxonomy.dateFormat setting and use the same value like the dateFormat property.
On the `datetime` field, you can set how to format your date.
For instance, in your case, you can set the following:
```json
{
"title": "Date",
"name": "date",
"type": "datetime",
"dateFormat": "yyyy-MM-dd'T'HH:mm:ssxxx"
}
```
If you want to set it for all your date fields, you can use the `frontMatter.taxonomy.dateFormat` setting and use the same value like the `dateFormat` property.
<!-- github-comment-id:1903695680 -->
How to set date format like 2024-01-21T16:54:43+07:00 ?
i've tried YYYY-MM-DD'T'HH:mm:ssZ not work
> ```json
> yyyy-MM-dd'T'HH:mm:ssxxx
> ```
not work, the result still UTC ISO format.

result

How to set date format like `2024-01-21T16:54:43+07:00` ?
i've tried `YYYY-MM-DD'T'HH:mm:ssZ` not work
<!-- github-comment-id:1903874643 -->
btw, in hexo _config.yml we can set timezone property like:
timezone:Asia/Jakarta
so, hexo will parse date with the given timezone or using config timezone. i think this caused inaccurate date output.
so, need custom formatting from frontmatter plugin to sync date with hexo.
btw, in hexo `_config.yml` we can set `timezone` property like:
```yaml
timezone: Asia/Jakarta
```
so, hexo will parse date with the given timezone or using config timezone. i think this caused inaccurate date output.
so, need custom formatting from frontmatter plugin to sync date with hexo.
<!-- github-comment-id:1903890312 -->
hey I found same format like hexo YYYY-MM-DD'T'HH:mm:ssZ.
the format is yyyy-MM-dd'T'HH:mm:ss.SSSXXX result 2024-01-25T22:03:38.825+07:00
how to output it like 2024-01-25T22:03:38+07:00 ?
hey I found same format like hexo `YYYY-MM-DD'T'HH:mm:ssZ`.
the format is `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` result `2024-01-25T22:03:38.825+07:00`
how to output it like `2024-01-25T22:03:38+07:00` ?
<!-- github-comment-id:1910394405 -->
I fixed this issue with set custom date format to yyyy-MM-dd'T'HH:mm:ssXXX
here working config example for hexo:
{"$schema":"https://frontmatter.codes/frontmatter.schema.json","frontMatter.content.autoUpdateDate":false,"frontMatter.preview.host":"http://localhost:4000","frontMatter.taxonomy.contentTypes":[{"name":"default","pageBundle":false,"fields":[{"title":"Title","name":"title","type":"string"},{"title":"Description","name":"description","type":"string"},{"title":"Publishing date","name":"date","type":"datetime","default":"{{now}}","isPublishDate":true,"dateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX"},{"title":"Thumbnail","name":"thumbnail","type":"image"},{"title":"Is in draft","name":"draft","type":"boolean"},{"title":"Tags","name":"tags","type":"tags"},{"title":"Categories","name":"categories","type":"categories"},{"title":"updated","name":"updated","type":"datetime","default":"{{now}}","isModifiedDate":true,"dateFormat":"yyyy-MM-dd'T'HH:mm:ssXXX"},{"name":"permalink","editable":true,"type":"slug"},{"title":"Author","name":"author","type":"divider"}]}],"frontMatter.framework.id":"hexo","frontMatter.content.publicFolder":"hexo:post_asset_folder","frontMatter.content.pageFolders":[{"path":"[[workspace]]/posts","title":"Source Posts"}],"frontMatter.site.baseURL":"https://www.webmanajemen.com/"}
If you want to set it for all your date fields, you can use the frontMatter.taxonomy.dateFormat setting and use the same value like the dateFormat property.
Thanks @dimaslanjaka I proposed it as well, might be that you've missed it. Glad you found it as well.
> On the `datetime` field, you can set how to format your date.
>
> For instance, in your case, you can set the following:
>
> ```json
> {
> "title": "Date",
> "name": "date",
> "type": "datetime",
> "dateFormat": "yyyy-MM-dd'T'HH:mm:ssxxx"
> }
> ```
>
> If you want to set it for all your date fields, you can use the `frontMatter.taxonomy.dateFormat` setting and use the same value like the `dateFormat` property.
Thanks @dimaslanjaka I proposed it as well, might be that you've missed it. Glad you found it as well.
<!-- github-comment-id:1910399838 -->
@estruyf the auto update date when file is modified not follow the pattern, please fix. i mentioned this closed issue for reference.
@estruyf the auto update date when file is modified not follow the pattern, please fix. i mentioned this closed issue for reference.
<!-- github-comment-id:2143641112 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Is your feature request related to a problem? Please describe.
Iam using
hexoframework.Hexo output time string when used format

2024-01-21T06:34:03.845Zis wrong hour. the result is2024-01-21T16:54:43+07:00i've tried changing config date format, but not working.


this also not work
Describe the solution you'd like
I want print custom date format like
2024-01-21T13:29:27+07:00Discussion: https://github.com/estruyf/vscode-front-matter/discussions/735
Related forum:
On the
datetimefield, you can set how to format your date.For instance, in your case, you can set the following:
If you want to set it for all your date fields, you can use the
frontMatter.taxonomy.dateFormatsetting and use the same value like thedateFormatproperty.not work, the result still UTC ISO format.
result
How to set date format like
2024-01-21T16:54:43+07:00?i've tried
YYYY-MM-DD'T'HH:mm:ssZnot workbtw, in hexo
_config.ymlwe can settimezoneproperty like:so, hexo will parse date with the given timezone or using config timezone. i think this caused inaccurate date output.
so, need custom formatting from frontmatter plugin to sync date with hexo.
hey I found same format like hexo
YYYY-MM-DD'T'HH:mm:ssZ.the format is
yyyy-MM-dd'T'HH:mm:ss.SSSXXXresult2024-01-25T22:03:38.825+07:00how to output it like
2024-01-25T22:03:38+07:00?I fixed this issue with set custom date format to
yyyy-MM-dd'T'HH:mm:ssXXXhere working config example for
hexo:result

Thanks @dimaslanjaka I proposed it as well, might be that you've missed it. Glad you found it as well.
@estruyf the auto update date when file is modified not follow the pattern, please fix. i mentioned this closed issue for reference.