Plugin Directory

Changeset 3376450


Ignore:
Timestamp:
10/10/2025 07:37:48 PM (5 months ago)
Author:
plainware
Message:

3.0.4

Location:
plaintracker/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plaintracker/trunk/plaintracker.php

    r3371968 r3376450  
    44Plugin URI: https://www.plaintracker.net/
    55Description: A time clock plugin. Workers clock in and out, managers keep track of their time.
    6 Version: 3.0.3
     6Version: 3.0.4
    77Author: plainware.com
    88Author URI: https://www.plainware.com/
  • plaintracker/trunk/ptr3/_/time/Time.php

    r3261705 r3376450  
    325325
    326326        $tz = $this->getTimezone();
    327         $tz = new \DateTimeZone( $tz );
    328         $t = new \DateTime( 'now', $tz );
    329         $ret = static::_convert( $t );
     327
     328    // weird stuff: Etc/GMT timezones are reversed so Etc/GMT+1 is actually Etc/GMT-1
     329        $prfx = 'Etc/GMT';
     330        if ($prfx === substr($tz, 0, strlen($prfx))) {
     331            $sign = substr($tz, strlen($prfx), 1);
     332            $tz = $prfx . (('-' === $sign) ? '+' : '-') . substr($tz, strlen($prfx) + 1);
     333        }
     334
     335        $tz = new \DateTimeZone($tz);
     336
     337        $t = new \DateTime('now', $tz);
     338        $ret = static::_convert($t);
    330339
    331340        return $ret;
  • plaintracker/trunk/readme.txt

    r3371968 r3376450  
    33Tags: timeclock, employee, attendance, clock, volunteer
    44License: GPLv2 or later
    5 Stable tag: 3.0.3
     5Stable tag: 3.0.4
    66Requires at least: 4.8
    77Tested up to: 6.8
     
    6868
    6969== Changelog ==
     70
     71= 3.0.4 (2025-10-10) =
     72BUG: Time was displayed incorrectly if the WordPress timezone was set to an UTC-relative option (like UTC+1).
    7073
    7174= 3.0.3 (2025-10-02) =
Note: See TracChangeset for help on using the changeset viewer.