Feature Request #3035

Timezone and timestamp format (used in Kohana_Log) should be available system-wide.

Added by Fred Wu over 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:06/30/2010
Priority:NormalDue date:
Assignee:Matt Button% Done:

100%

Category:Core
Target version:v3.0.8
Resolution:fixed Points:

Description

Timezone and timestamp format right now are hard coded in Kohana_Log. Let's put 'em into Kohana_Date instead, so they are available for the app and the modules to use.

Here are the two commits that add this feature.

http://github.com/fredwu/kohana-core/commit/8b5420ab71d13dc7a7e1e6cd15628ebab46c0536
http://github.com/fredwu/kohana-core/commit/ad7efe13a96dc5d9b5d48bfd5584d1094e3d3df3

Associated revisions

Revision 8e88b965
Added by Matt Button about 4 years ago

Adding tests for Date::formatted_time() fixes #3035

History

#1 Updated by Woody Gilk over 4 years ago

  • Target version changed from v3.0.7 to v3.0.8

#2 Updated by Matt Button over 4 years ago

  • Status changed from New to Assigned
  • Assignee changed from Woody Gilk to Matt Button

#3 Updated by Kiall Mac Innes over 4 years ago

Also - I was writing a database log driver - and turns out, it gets handed the pre-formatted date ;).

If we move this into a Kohana_Date, then the file driver can receive a timestamp, and format it on its own.

#4 Updated by Matt Button over 4 years ago

That might need to be a separate issue as it could technically be an api change...

#5 Updated by Kiall Mac Innes over 4 years ago

Well - creating a new Date::format() or w/e method is also an API change? Lets see how this progresses before I open a second ticket.

#6 Updated by Matt Button over 4 years ago

  • % Done changed from 100 to 60

Kiall Mac Innes wrote:

Well - creating a new Date::format() or w/e method is also an API change? Lets see how this progresses before I open a second ticket.

I meant in the sense that if someone's created a log driver which expects the passed date to be a formatted string then their log driver could potentially break.

#7 Updated by Matt Button about 4 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 60 to 100
  • Resolution set to fixed

#8 Updated by Matt Button about 4 years ago

After discussion with Isaiah re-added the timezone property to Kohana_Log to maintain backwards compatability

http://github.com/kohana/core/commit/b36d69c324794a044483c57c14af95dd11e1ee01

Also available in: Atom PDF