Skip to content

fix(mtime): Use UnixTime at all of the modified fields#3739

Merged
yoshinorin merged 1 commit intohexojs:masterfrom
yoshinorin:fix-mtime-type
Sep 30, 2019
Merged

fix(mtime): Use UnixTime at all of the modified fields#3739
yoshinorin merged 1 commit intohexojs:masterfrom
yoshinorin:fix-mtime-type

Conversation

@yoshinorin
Copy link
Member

@yoshinorin yoshinorin commented Sep 29, 2019

What does it do?

A current modified field mixed UnixTime and ISO8601.
It seems modified field expect to use UnixTime but stats.mtime return ISO8601 format.

Migrates to warehouse v3.0 test failure (#3736) caused by this type of diff.
Because before warehouse v3.0, the warehouse replaceById method return UnixTime forcibly.

How to test

git clone -b BRANCH https://github.com/USER/hexo.git
cd hexo
npm install
npm test

Screenshots

Nothing

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 97.278% when pulling 4de67fa on YoshinoriN:fix-mtime-type into 6cda202 on hexojs:master.

@curbengh curbengh added this to the v4.0.0 milestone Sep 30, 2019
@curbengh
Copy link
Contributor

Migrates to warehouse v3.0 test failure (#3736) caused by this type of diff.
Because before warehouse v3.0, the warehouse replaceById method return UnixTime forcibly.

In addition to this PR, should warehouse have force-UnixTime back?

@yoshinorin
Copy link
Member Author

yoshinorin commented Sep 30, 2019

@curbengh

In addition to this PR, should warehouse have force-UnixTime back?

Hmm... It is difficult. But, I think maybe no. Because this behavior seems accidental (maybe a bug). Maybe not expected behavior.

@yoshinorin yoshinorin merged commit 58a4882 into hexojs:master Sep 30, 2019
@yoshinorin yoshinorin deleted the fix-mtime-type branch September 30, 2019 11:20
thom4parisot pushed a commit to thom4parisot/hexo that referenced this pull request Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants