Vault  4.1
Public Member Functions | Public Attributes
VInstantStruct Class Reference

This structure is passed to or returned by the core functions to describe a calendar structured instant in some implied time zone. More...

#include <vinstant.h>

List of all members.

Public Member Functions

 VInstantStruct (const VDate &date, const VTimeOfDay &timeOfDay)
Vs64 getOffsetFromUTCStruct () const
 Returns the UTC Epoch Offset of this Time Struct, treating the Time Struct as an instant in the UTC time zone.
Vs64 getOffsetFromLocalStruct () const
 Returns the UTC Epoch Offset of this Time Struct, treating the Time Struct as an instant in the machine's local time zone.
void setUTCStructFromOffset (Vs64 offset)
 Fills in a Time Struct to represent the specified UTC Epoch Offset in the UTC time zone.
void setLocalStructFromOffset (Vs64 offset)
 Fills in this Time Struct to represent the specified UTC Epoch Offset in the machine's local time zone.
void getTmStruct (struct tm &fields) const
 Copies this Time Struct into a "struct tm" POSIX structure.
void setFromTmStruct (const struct tm &fields, int millisecond)
 Sets up this Time Struct from a "struct tm" POSIX structure.

Public Attributes

int mYear
 The year.
int mMonth
 The month (1 to 12).
int mDay
 The day of the month (1 to 31).
int mHour
 The hour of day (0 to 23).
int mMinute
 The minute of the hour (0 to 59).
int mSecond
 The second of the minute (0 to 59).
int mMillisecond
 The millisecond within the second (0 to 999).
int mDayOfWeek
 See enum in VInstant: kSunday=0..kSaturday=6.

Detailed Description

This structure is passed to or returned by the core functions to describe a calendar structured instant in some implied time zone.

Definition at line 260 of file vinstant.h.


Member Function Documentation

Vs64 VInstantStruct::getOffsetFromUTCStruct ( ) const

Returns the UTC Epoch Offset of this Time Struct, treating the Time Struct as an instant in the UTC time zone.

The mDayOfWeek field is ignored.

Returns:
the UTC Epoch Offset of this UTC time struct

Definition at line 428 of file vinstant.cpp.

References CONST_S64, getTmStruct(), mDay, mHour, mMillisecond, mMinute, mMonth, mSecond, and mYear.

Vs64 VInstantStruct::getOffsetFromLocalStruct ( ) const

Returns the UTC Epoch Offset of this Time Struct, treating the Time Struct as an instant in the machine's local time zone.

The mDayOfWeek field is ignored.

Returns:
the UTC Epoch Offset of this local time struct

Definition at line 452 of file vinstant.cpp.

void VInstantStruct::setUTCStructFromOffset ( Vs64  offset)

Fills in a Time Struct to represent the specified UTC Epoch Offset in the UTC time zone.

Parameters:
offseta UTC Epoch Offset

Definition at line 456 of file vinstant.cpp.

void VInstantStruct::setLocalStructFromOffset ( Vs64  offset)

Fills in this Time Struct to represent the specified UTC Epoch Offset in the machine's local time zone.

Parameters:
offseta UTC Epoch Offset

Definition at line 460 of file vinstant.cpp.

void VInstantStruct::getTmStruct ( struct tm &  fields) const

Copies this Time Struct into a "struct tm" POSIX structure.

Parameters:
fieldsthe tm struct to initialize

Definition at line 464 of file vinstant.cpp.

References mDay, mHour, mMinute, mMonth, mSecond, and mYear.

void VInstantStruct::setFromTmStruct ( const struct tm &  fields,
int  millisecond 
)

Sets up this Time Struct from a "struct tm" POSIX structure.

Parameters:
fieldsthe tm struct to copy
millisecondthe ms value to use, since tm only has second resolution; normally zero except for some conversions

Definition at line 476 of file vinstant.cpp.

References mDay, mDayOfWeek, mHour, mMillisecond, mMinute, mMonth, mSecond, and mYear.


The documentation for this class was generated from the following files:

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.