[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.5-41-g5459692

Alex Vandiver alexmv at bestpractical.com
Mon Jun 16 18:24:45 EDT 2014


The branch, 4.2-trunk has been updated
       via  545969206fea6a39a18389985f779fd1d3caac3a (commit)
       via  c8d71c3f689925e897280d1e206e94728a210e95 (commit)
       via  48ae1f5b2d2d33ecec97fecf72c8923b13caf019 (commit)
      from  6e569521a6d6bb1dd808ae45e291b47ba75e50af (commit)

Summary of changes:
 lib/RT/Date.pm | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

- Log -----------------------------------------------------------------
commit 48ae1f5b2d2d33ecec97fecf72c8923b13caf019
Author: Alex Peters <alex at peters.net>
Date:   Tue Jun 10 13:13:33 2014 +1000

    correct RT::Date->Timezone argument error message
    
    This method is not a setter.

diff --git a/lib/RT/Date.pm b/lib/RT/Date.pm
index c9f9ca4..15f887e 100644
--- a/lib/RT/Date.pm
+++ b/lib/RT/Date.pm
@@ -1124,7 +1124,7 @@ sub Timezone {
     my $self = shift;
 
     if (@_ == 0) {
-        Carp::carp "RT::Date->Timezone is a setter only";
+        Carp::carp 'RT::Date->Timezone requires a context argument';
         return undef;
     }
 

commit c8d71c3f689925e897280d1e206e94728a210e95
Author: Alex Peters <alex at peters.net>
Date:   Tue Jun 10 13:23:49 2014 +1000

    correct RT::Date->Timezone documentation
    
      - There is no special handling for a "utc" context.
    
      - There is no default value for $context.
    
      - "UTC" may be still returned in cases where one of the server's and
        user's timezones is set.

diff --git a/lib/RT/Date.pm b/lib/RT/Date.pm
index 15f887e..9852584 100644
--- a/lib/RT/Date.pm
+++ b/lib/RT/Date.pm
@@ -1098,26 +1098,24 @@ sub Timelocal {
 
 =head3 Timezone $context
 
-Returns the timezone name.
-
-Takes one argument, C<$context> argument which could be C<user>, C<server> or C<utc>.
+Returns the timezone name for the specified context.  C<$context>
+should be one of these values:
 
 =over
 
-=item user
-
-Default value is C<user> that mean it returns current user's Timezone value.
+=item C<user>
 
-=item server
+The current user's Timezone value will be returned.
 
-If context is C<server> it returns value of the C<Timezone> RT config option.
+=item C<server>
 
-=item  utc
-
-If both server's and user's timezone names are undefined returns 'UTC'.
+The value of the C<Timezone> RT config option will be returned.
 
 =back
 
+For any other value of C<$context>, or if the specified context has no
+defined timezone, C<UTC> is returned.
+
 =cut
 
 sub Timezone {

commit 545969206fea6a39a18389985f779fd1d3caac3a
Merge: 6e56952 c8d71c3
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Jun 16 18:24:30 2014 -0400

    Merge branch '4.2/date-timezone-docs' into 4.2-trunk


-----------------------------------------------------------------------


More information about the rt-commit mailing list