← Back to team overview

mahara-contributors team mailing list archive

[Bug 1451328] Re: Timezone identifier support for PHP on Windows

 

For anyone who's interested, here's a table I found, of all the format
strings that aren't supported in Windows, and what to substitute for
them. Fortunately in Mahara all we use is %z, %e, %k, and %l.

%C -> 2-digit represation of the century (19 for 1959)
%V -> Week number of the given year starting with the first week with at least 4 weekdays
%g -> Two-digit year of the current %V week
%G -> Four-digit year of the current %V week
%u => Day of week with Monday = 1 -> Sunday = 7. Can calculate from %w (Sunday = 0 -> Saturday = 6)
%z => Timezone offset, i.e. -0500 for US Eastern Standard Time.
%Z => Timezone abbreviation, i.e. EST for US Eastern Standard Time.
%s => time()
%P -> strtoupper(%p)
%n => \n (newline)
%t => \t (tab)
%D -> %m/%d/%y
%F -> %Y-%m-%d
%R -> %H:%M
%T -> %H:%M:%S
%r => %I:%M:%S:%P
%h -> %b
%e -> %#d // Used in Mahara
%k => %#H // Used in Mahara
%l => %#I // Used in Mahara

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1451328

Title:
  Timezone identifier support for PHP on Windows

Status in Mahara ePortfolio:
  Triaged

Bug description:
  Last login column for users search is blank (and does not sort in the
  correct order) also the warning saying 'PHP on your website host does
  not return a useful value for the timezone identifier (%z) .....' on
  the admin page is not a fix for the problem and unfortunately some of
  us are not able to change from hosting on a Windows server.

  I am wondering if Mahara is using strftime resulting in the time zone
  identifier returning 'New Zealand Standard Time' in Windows rather
  than Linux' +1200 is part of the problem.

  I have searched the forums but not found a fix.

  Server: Windows 2012 R2
  Mahara version: 15.04.0 and 1.9.4
  IIS: 8.5 (both servers) also had same problem on a WAMP environment
  PHP version: 5.5.3 and 5.5.8
  MySQL version: 5.5.40 on both servers

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1451328/+subscriptions


References