NAME

BuildForge::Services::DBO::TimeZone


SYNOPSIS

        use BuildForge::Services;
        $conn = new BuildForge::Services::Connection($hostname);
        $token = $conn->authUser($user, $pass);
        
        # Getting existing timezones
        $allTimeZones = BuildForge::Services::DBO::TimeZone->findAll($conn);
        $oldtimezone = BuildForge::Services::DBO::TimeZone->findById($conn, 'DST');
        # Getter / setter functions
        $id = $oldtimezone->getZoneId();
        $description = $oldtimezone->getDescription();
        $differenceFromGMTInSeconds = $oldtimezone->getGmtOffset();
        $whichWeekStartsDaylightSavingsTime = $oldtimezone->getDstStartPos();
        $whichDayStartsDaylightSavingsTime = $oldtimezone->getDstStartDay();
        $whichMonthStartsDaylightSavingsTime = $oldtimezone->getDstStartMon();
        $whichWeekEndsDaylightSavingsTime = $oldtimezone->getDstEndPos();
        $whichDayEndsDaylightSavingsTime = $oldtimezone->getDstEndDay();
        $whichMonthEndsDaylightSavingsTime = $oldtimezone->getDstEndMon();
        $daylightSavingsTimeOffsetInSeconds = $oldtimezone->getDstOffset();
        $conn->logout;
        $conn->close;


DESCRIPTION

TimeZone allows you to create, access, and delete BuildForge time zones. As the time zones already in the database encompass most standard time zones, this should rarely be useful.

head1 METHODS

BuildForge::Services::DBO::TimeZone->findAll(connection)

Returns a reference to an array of BuildForge::Services::DBO::TimeZone objects corresponding to all timezones in the database.

connection

A connected BuildForge::Services::Connection object.

BuildForge::Services::DBO::TimeZone->findById(connection, timeZoneId)

Returns the BuildForge::Services::DBO::TimeZone object corresponding to the given timezone ID, or undef if no such object exists.

connection

A connected BuildForge::Services::Connection object.

timeZoneId

The ID of the timezone to return (from $timezone->getZoneId()).

$timezone->getZoneId()

Returns the timezone's ID.

$timezone->getDescription()

Returns the timezone's description.

$timezone->getGmtOffset()

Returns the amount of offset from GMT in seconds. Timezones that are ahead of GMT have positive values and timezones that are behind GMT have negative values.

$timezone->getDstStartPos()

If this timezone has daylight savings time, returns the week within the month that it starts. For example, if DST starts on the 2nd Tuesday in a month, this will be 2. The last week of the month is value 6. If this timezone lacks DST, returns 0.

$timezone->getDstStartDay()

Returns the day of the week on which daylight savings time starts, going from 0 (Sunday) to 6 (Saturday). A value of -1 means this time zone lacks DST.

$timezone->getDstStartMon()

Returns the month in which daylight savings time starts, going from 0 (January) to 11 (December). A value of -1 means this time zone lacks DST.

$timezone->getDstEndPos()

If this timezone has daylight savings time, returns the week within the month that it ends. For example, if DST ends on the 3rd Thursday in a month, this will be 3. The last week of the month is value 6. If this timezone lacks DST, returns 0.

$timezone->getDstEndDay()

Returns the day of the week on which daylight savings time ends, going from 0 (Sunday) to 6 (Saturday). A value of -1 means this time zone lacks DST.

$timezone->getDstEndMon()

Returns the month in which daylight savings time ends, going from 0 (January) to 11 (December). A value of -1 means this time zone lacks DST.

$timezone->getDstOffset()

Returns the amount of offset to be added to the time when daylight savings time is in effect in seconds.


COPYRIGHT

Copyright (c)2006-2007 International Business Machines, Inc. All rights reserved.