# Copyright (c) 2006-2010 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: TimeZone.bunit,v 1.6 2010/01/28 17:29:09 nagler Exp $ req()->put(query => {timezone => 1}); req()->set_realm(qw(demo)); [ class() => [ from_literal => [ UTC => [class()->UTC], EUROPE_LONDON => [class()->EUROPE_LONDON], ASIA_TOKYO => [class()->ASIA_TOKYO], ], get_default => [ [] => [class()->UTC], ], execute_from_query => [ [req()] => sub { return req('Type.TimeZone')->eq_utc; }, ], unsafe_from_int => [ [1] => [class()->UTC], ], row_tag_replace => [ [undef, req()] => not_die(), ], row_tag_get => [ [req()] => [class()->UTC], ], row_tag_replace => [ [class()->EUROPE_LONDON, req()] => not_die(), ], row_tag_get => [ [req()] => [class()->EUROPE_LONDON], ], ], sub {class()->UTC} => [ date_time_to_utc => [ '2452260 24455' => '2452260 24455', ], date_time_from_utc => [ '2452260 24455' => '2452260 24455', ], QUERY_KEY => 'timezone', add_to_query => [ [{abc => 'def'}] => [{abc => 'def', timezone => 1}], ], get_long_desc => 'UTC', ], sub {class()->AMERICA_DENVER} => [ date_time_to_utc => [ '2452260 24455' => '2452260 49655', ], date_time_from_utc => [ '2452260 49655' => '2452260 24455', ], get_long_desc => 'America/Denver', ], ];