Skip to content

Conversation

@mondeja
Copy link

@mondeja mondeja commented Oct 23, 2025

This is a fix in a test.

Summary

The test "jsonify filter" -> "convert drop to json" depends on the system timezone.

Context

I'm getting the next error executing the unit tests locally:

TestFilters#test_: filters jsonify filter should convert drop to json.  [/home/mondeja/files/code/jekyll-site-example/jekyll/test/test_filters.rb:707]
Minitest::Assertion: --- expected
+++ actual
@@ -1,25 +1,25 @@
 {
+  "date": "2008-02-02 00:00:00 +0100",
+  "collection": "posts",
   "name": "2008-02-02-published.markdown",
   "path": "_posts/2008-02-02-published.markdown",
-  "previous": null,
-  "output": null,
+  "url": "/publish_test/2008/02/02/published.html",
   "content": "This should be published.
 ",
-  "id": "/publish_test/2008/02/02/published",
-  "url": "/publish_test/2008/02/02/published.html",
-  "relative_path": "_posts/2008-02-02-published.markdown",
-  "collection": "posts",
   "excerpt": "<p>This should be published.</p>
 ",
-  "draft": false,
+  "id": "/publish_test/2008/02/02/published",
   "categories": [
     "publish_test"
   ],
-  "layout": "default",
+  "relative_path": "_posts/2008-02-02-published.markdown",
+  "tags": [],
+  "previous": null,
   "title": "Publish",
+  "output": null,
+  "draft": false,
+  "layout": "default",
   "category": "publish_test",
-  "date": "2008-02-02 00:00:00 +0000",
   "slug": "published",
-  "ext": ".markdown",
-  "tags": []
+  "ext": ".markdown"
 }

If you check the difference carefully, you'll observe that the date fields are not the same:

-  "date": "2008-02-02 00:00:00 +0000",
+  "date": "2008-02-02 00:00:00 +0100",

That happens because I'm in CET timezone (+0100), which is different to the UTC in which GitHub Actions runs.

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.

1 participant