Classes Files

mama/timezone.h

Functions

  Name
MAMAExpDLL mamaTimeZone mamaTimeZone_local(void )
MAMAExpDLL mamaTimeZone mamaTimeZone_utc(void )
MAMAExpDLL mamaTimeZone mamaTimeZone_usEastern(void )
MAMAExpDLL mama_status mamaTimeZone_create(mamaTimeZone * timeZone)
MAMAExpDLL mama_status mamaTimeZone_createFromTz(mamaTimeZone * timeZone, const char * tzId)
MAMAExpDLL mama_status mamaTimeZone_createCopy(mamaTimeZone * timeZone, const mamaTimeZone timeZoneCopy)
MAMAExpDLL mama_status mamaTimeZone_destroy(mamaTimeZone timeZone)
MAMAExpDLL mama_status mamaTimeZone_copy(mamaTimeZone timeZone, const mamaTimeZone timeZoneCopy)
MAMAExpDLL mama_status mamaTimeZone_set(mamaTimeZone timeZone, const char * tzId)
MAMAExpDLL mama_status mamaTimeZone_clear(mamaTimeZone timeZone)
MAMAExpDLL mama_status mamaTimeZone_getTz(const mamaTimeZone timeZone, const char ** result)
MAMAExpDLL mama_status mamaTimeZone_getOffset(const mamaTimeZone timeZone, mama_i32_t * result)
MAMAExpDLL mama_status mamaTimeZone_check(mamaTimeZone timeZone)
MAMAExpDLL void mamaTimeZone_setScanningInterval(mama_f64_t seconds)
MAMAExpDLL void mamaTimeZone_cleanUp(void )

Functions Documentation

function mamaTimeZone_local

MAMAExpDLL mamaTimeZone mamaTimeZone_local(
    void 
)

Return a pointer to a mamaTimeZone corresponding to the local time zone.

function mamaTimeZone_utc

MAMAExpDLL mamaTimeZone mamaTimeZone_utc(
    void 
)

Return a pointer to a mamaTimeZone corresponding to the UTC time zone.

function mamaTimeZone_usEastern

MAMAExpDLL mamaTimeZone mamaTimeZone_usEastern(
    void 
)

Return a pointer to a mamaTimeZone corresponding to the US Eastern time zone.

function mamaTimeZone_create

MAMAExpDLL mama_status mamaTimeZone_create(
    mamaTimeZone * timeZone
)

Create an instance of a mamaTimeZone.

function mamaTimeZone_createFromTz

MAMAExpDLL mama_status mamaTimeZone_createFromTz(
    mamaTimeZone * timeZone,
    const char * tzId
)

Create an instance of a mamaTimeZone with a standard TZ identifier (NULL identifier is equivalent to the local time zone)

function mamaTimeZone_createCopy

MAMAExpDLL mama_status mamaTimeZone_createCopy(
    mamaTimeZone * timeZone,
    const mamaTimeZone timeZoneCopy
)

Create an instance of a mamaTimeZone by copying from another instance.

function mamaTimeZone_destroy

MAMAExpDLL mama_status mamaTimeZone_destroy(
    mamaTimeZone timeZone
)

Destroy an instance of a mamaTimeZone.

function mamaTimeZone_copy

MAMAExpDLL mama_status mamaTimeZone_copy(
    mamaTimeZone timeZone,
    const mamaTimeZone timeZoneCopy
)

Copy an instance of a mamaTimeZone (to a previously-created instance).

function mamaTimeZone_set

MAMAExpDLL mama_status mamaTimeZone_set(
    mamaTimeZone timeZone,
    const char * tzId
)

Set an existing instance of a mamaTimeZone to a new time zone.

function mamaTimeZone_clear

MAMAExpDLL mama_status mamaTimeZone_clear(
    mamaTimeZone timeZone
)

Clear the time zone (but not destroyed).

function mamaTimeZone_getTz

MAMAExpDLL mama_status mamaTimeZone_getTz(
    const mamaTimeZone timeZone,
    const char ** result
)

Get the time zone ID string.

function mamaTimeZone_getOffset

MAMAExpDLL mama_status mamaTimeZone_getOffset(
    const mamaTimeZone timeZone,
    mama_i32_t * result
)

Get the offset from UTC (in seconds). Can be positive or negative, depending upon the direction.

function mamaTimeZone_check

MAMAExpDLL mama_status mamaTimeZone_check(
    mamaTimeZone timeZone
)

Check (recalculate) the UTC offset in case it has changed due to daylight savings adjustments.

function mamaTimeZone_setScanningInterval

MAMAExpDLL void mamaTimeZone_setScanningInterval(
    mama_f64_t seconds
)

Set the interval of the thread updating each MamaTimeZone instance offset.

function mamaTimeZone_cleanUp

MAMAExpDLL void mamaTimeZone_cleanUp(
    void 
)

If you used any timezone functions, you’ll need to call this function to clean up any memory they will have allocated, but hung onto to avoid constant re-allocation of resources on the critical path.

Source code

/* $Id$
 *
 * OpenMAMA: The open middleware agnostic messaging API
 * Copyright (C) 2011 NYSE Technologies, Inc.
 *
 * 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, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA
 */

#include <mama/config.h>
#include <mama/status.h>
#include <mama/types.h>
#include "wombat/port.h"

#ifndef MamaTimeZoneH__
#define MamaTimeZoneH__




#if defined(__cplusplus)
extern "C" {
#endif

MAMAExpDLL
extern mamaTimeZone mamaTimeZone_local(void);

MAMAExpDLL
extern mamaTimeZone mamaTimeZone_utc(void);

MAMAExpDLL
extern mamaTimeZone mamaTimeZone_usEastern(void);

MAMAExpDLL
extern mama_status
mamaTimeZone_create (mamaTimeZone*  timeZone);

MAMAExpDLL
extern mama_status
mamaTimeZone_createFromTz (mamaTimeZone*  timeZone,
                           const char*    tzId);

MAMAExpDLL
extern mama_status
mamaTimeZone_createCopy (mamaTimeZone*        timeZone,
                         const mamaTimeZone   timeZoneCopy);

MAMAExpDLL
extern mama_status
mamaTimeZone_destroy (mamaTimeZone  timeZone);

MAMAExpDLL
extern mama_status
mamaTimeZone_copy (mamaTimeZone        timeZone,
                   const mamaTimeZone  timeZoneCopy);

MAMAExpDLL
extern mama_status
mamaTimeZone_set (mamaTimeZone  timeZone,
                  const char*   tzId);

MAMAExpDLL
extern mama_status
mamaTimeZone_clear (mamaTimeZone  timeZone);

MAMAExpDLL
extern mama_status
mamaTimeZone_getTz (const mamaTimeZone  timeZone,
                    const char**        result);

MAMAExpDLL
extern mama_status
mamaTimeZone_getOffset (const mamaTimeZone  timeZone,
                        mama_i32_t*         result);

MAMAExpDLL
extern mama_status
mamaTimeZone_check (mamaTimeZone  timeZone);

MAMAExpDLL
extern void
mamaTimeZone_setScanningInterval (mama_f64_t  seconds);

MAMAExpDLL
extern void
mamaTimeZone_cleanUp (void);


#if defined(__cplusplus)
}
#endif

#endif

Updated on 2023-03-31 at 15:29:17 +0100