Skip to content

Commit 013f40d

Browse files
Modified logic for events_array_generator to show events 1 day after event (atm due to UTC timing I add 2 full days in seconds to post's date to keep it displayed).
Added timezone setting to config files.
1 parent 6390a84 commit 013f40d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ exclude:
2222
- _pages/02_get_started.html
2323
- DOCS/
2424
future: true
25+
timezone: Europe/London
2526

2627
collections:
2728
sponsors:

_config_dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ exclude:
2222
- _pages/02_get_started.html
2323
- DOCS/
2424
future: true
25+
timezone: Europe/London
2526

2627
collections:
2728
sponsors:

_includes/events_array_generator.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
{% endif %}
3939

4040
{% assign post_count = 0 %}
41-
{% assign curDate = site.time | date: "%s" %}
41+
{% assign curDate = site.time | date: "%s" | plus: 0 %}
4242
{% assign posts = "" | split: ',' %}
4343
{% for post in site.posts %}
4444
{% unless category == all %}
@@ -47,7 +47,7 @@
4747
{% endunless %}
4848
{% endunless %}
4949

50-
{% assign postStartDate = post.date | date: "%s" %}
50+
{% assign postStartDate = post.date | date: "%s" | plus: 172800 %}
5151
{% if future_events %}
5252
{% if postStartDate >= curDate %}
5353
{% assign posts = posts | push: post %}

0 commit comments

Comments
 (0)