creation_day() etc use local time, not gmtime.
authorJoey Hess <joey@kitenet.net>
Tue, 1 Jun 2010 00:46:12 +0000 (20:46 -0400)
committerJoey Hess <joey@kitenet.net>
Tue, 1 Jun 2010 00:46:12 +0000 (20:46 -0400)
To match calendars, which use local time. Particularly important at
the end of the month.

I checked the history, and there seemed no good rationalle for the
pagespecs to use gmtime.

IkiWiki.pm
debian/changelog

index 0f28801a60a354cf38b1b8f271133fb22acc60a0..e2a3d216f4b09a1872792374b3d87cdba8fc58dd 100644 (file)
@@ -2463,7 +2463,7 @@ sub match_created_after ($$;@) {
 }
 
 sub match_creation_day ($$;@) {
-       if ((gmtime($IkiWiki::pagectime{shift()}))[3] == shift) {
+       if ((localtime($IkiWiki::pagectime{shift()}))[3] == shift) {
                return IkiWiki::SuccessReason->new('creation_day matched');
        }
        else {
@@ -2472,7 +2472,7 @@ sub match_creation_day ($$;@) {
 }
 
 sub match_creation_month ($$;@) {
-       if ((gmtime($IkiWiki::pagectime{shift()}))[4] + 1 == shift) {
+       if ((localtime($IkiWiki::pagectime{shift()}))[4] + 1 == shift) {
                return IkiWiki::SuccessReason->new('creation_month matched');
        }
        else {
@@ -2481,7 +2481,7 @@ sub match_creation_month ($$;@) {
 }
 
 sub match_creation_year ($$;@) {
-       if ((gmtime($IkiWiki::pagectime{shift()}))[5] + 1900 == shift) {
+       if ((localtime($IkiWiki::pagectime{shift()}))[5] + 1900 == shift) {
                return IkiWiki::SuccessReason->new('creation_year matched');
        }
        else {
index 28dc1b17676bd3d94993d18f9db7b89f348a67f7..0a7d17eb75c4aad563c4664bf4fc757797f17340 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (3.20100518.3) UNRELEASED; urgency=low
+
+  * creation_day() etc use local time, not gmtime. To match calendars, which
+    use local time.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 31 May 2010 20:44:17 -0400
+
 ikiwiki (3.20100518.2) unstable; urgency=low
 
   * Fix a typo in the last release.