B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Enumerations | Functions | Variables
B2BITS_TZTimeHelper.h File Reference

Contains Engine::TZTimeHelper function. More...

#include <string>
#include <iosfwd>
#include <B2BITS_V12_Defines.h>
#include <B2BITS_IntDefines.h>
#include <B2BITS_String.h>
+ Include dependency graph for B2BITS_TZTimeHelper.h:

Classes

struct  Engine::TZTimeHelper::TZTimeOnly
 Data about time with UTC offset. More...
 
struct  Engine::TZTimeHelper::TZTimestamp
 Data about date and time with UTC offset. More...
 
struct  Engine::TZTimeHelper::UTCDateOnly
 Data about date. More...
 
struct  Engine::TZTimeHelper::UTCTimeOnly
 Time without UTC offset. More...
 
struct  Engine::TZTimeHelper::UTCTimestamp
 Data about date and time without UTC offset. More...
 

Namespaces

 Engine
 FIX Engine namespace.
 
 Engine::TZTimeHelper
 

Enumerations

enum  Engine::TZTimeHelper::TimeFlags {
  Engine::TZTimeHelper::Seconds = 0x01, Engine::TZTimeHelper::Milliseconds = 0x02 | Seconds, Engine::TZTimeHelper::Microseconds = 0x04 | Milliseconds, Engine::TZTimeHelper::Nanoseconds = 0x08 | Microseconds,
  Engine::TZTimeHelper::Picoseconds = 0x10 | Nanoseconds, Engine::TZTimeHelper::TrimTrailingZeros = 0x80, Engine::TZTimeHelper::MillisecondsAndTrim = Milliseconds | TrimTrailingZeros, Engine::TZTimeHelper::MicrosecondsAndTrim = Microseconds | TrimTrailingZeros,
  Engine::TZTimeHelper::NanosecondsAndTrim = Nanoseconds | TrimTrailingZeros, Engine::TZTimeHelper::PicosecondsAndTrim = Picoseconds | TrimTrailingZeros
}
 Time flags for converts to string. More...
 

Functions

void V12_API Engine::TZTimeHelper::nanosToUTCTimestamp (System::u64 nanoTimestamp, UTCTimestamp &timestamp)
 Fills date and time in TZTimestamp from nano seconds timestamp in UTC. More...
 
void V12_API Engine::TZTimeHelper::nowTZDateOnly (UTCDateOnly &date)
 Fills current date in UTCDateOnly in local time zone. More...
 
UTCDateOnly V12_API Engine::TZTimeHelper::nowTZDateOnly ()
 Get current date with local time zone. More...
 
void V12_API Engine::TZTimeHelper::nowTZTimeOnly (TZTimeOnly &time)
 Fills current time in TZTimeOnly. More...
 
TZTimeOnly V12_API Engine::TZTimeHelper::nowTZTimeOnly ()
 Get current time in local time zone. More...
 
void V12_API Engine::TZTimeHelper::nowTZTimestamp (TZTimestamp &timestamp)
 Fills current date and time in TZTimestamp. More...
 
TZTimestamp V12_API Engine::TZTimeHelper::nowTZTimestamp ()
 Get current time and date in local time zone. More...
 
void V12_API Engine::TZTimeHelper::nowUTCDateOnly (UTCDateOnly &date)
 Fills current date in UTCDateOnly in UTC. More...
 
UTCDateOnly V12_API Engine::TZTimeHelper::nowUTCDateOnly ()
 Get current date in UTC. More...
 
void V12_API Engine::TZTimeHelper::nowUTCTimeOnly (UTCTimeOnly &time)
 Fills current time in UTCTimeOnly. More...
 
UTCTimeOnly V12_API Engine::TZTimeHelper::nowUTCTimeOnly ()
 Get current time in UTC. More...
 
void V12_API Engine::TZTimeHelper::nowUTCTimestamp (UTCTimestamp &timestamp)
 Fills current date and time in TZTimestamp. More...
 
UTCTimestamp V12_API Engine::TZTimeHelper::nowUTCTimestamp ()
 Get current date and time in UTC. More...
 
bool V12_API Engine::TZTimeHelper::parseDateOnly (const char *data, size_t lenght, UTCDateOnly &date)
 Parses string UTCDateOnly - "YYYYMMDD" to UTCDateOnly structure. More...
 
bool V12_API Engine::TZTimeHelper::parseTimeOnly (const char *data, size_t lenght, TZTimeOnly &time)
 Parses string UTCTimeOnly( "HH:MM:SS[.sss]" ) or TZTimeOnly( "HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]]" ) to TZTimeOnly structure. More...
 
bool V12_API Engine::TZTimeHelper::parseTimestamp (const char *data, size_t lenght, TZTimestamp &timestamp)
 Parses string UTCTimestamp( "YYYYMMDD-HH:MM:SS[.sss]" ) or TZTimestamp( "YYYYMMDD-HH:MM:SS[.sss][Z | [ + | - hh[:mm]]]" ) to TZTimestamp structure. More...
 
bool V12_API Engine::TZTimeHelper::parseUTCTimeOnly (const char *data, size_t lenght, UTCTimeOnly &time)
 Parses string UTCTimeOnly - "HH:MM:SS[.sss]" to UTCTimeOnly structure. More...
 
bool V12_API Engine::TZTimeHelper::parseUTCTimestamp (const char *data, size_t lenght, UTCTimestamp &timestamp)
 Parses string UTCTimestamp - "YYYYMMDD-HH:MM:SS[.sss]" to UTCTimestamp structure. More...
 
void V12_API Engine::TZTimeHelper::timeSpecFromTZTimestamp (struct timespec &ts, const TZTimestamp &timestamp, bool convertToUTC=true)
 Converts TZTimestamp to timespec. More...
 
void V12_API Engine::TZTimeHelper::timeSpecTFromUTCTimestamp (struct timespec &ts, const UTCTimestamp &timestamp)
 Converts UTCTimestamp to timespec. More...
 
time_t V12_API Engine::TZTimeHelper::timeTFromTZTimestamp (const TZTimestamp &timestamp, bool convertToUTC=true)
 Converts TZTimestamp to time_t. More...
 
time_t V12_API Engine::TZTimeHelper::timeTFromUTCTimestamp (const UTCTimestamp &timestamp)
 Converts UTCTimestamp to time_t. More...
 
size_t V12_API Engine::TZTimeHelper::tzTimeOnlyToString (char *data, size_t lenght, const TZTimeOnly &time, TimeFlags flags=Milliseconds)
 Converts to char buffer TZTimeOnly( "HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]]" ) without terminating zero. More...
 
void V12_API Engine::TZTimeHelper::tzTimestampFromTimeSpec (TZTimestamp &timestamp, const struct timespec &ts, System::i16 utcOffset=0)
 Converts timespec to TZTimestamp. More...
 
void V12_API Engine::TZTimeHelper::tzTimestampFromTimeT (TZTimestamp &timestamp, time_t time_utc, System::i16 utcOffset=0)
 Converts time_t to UTCTimestamp. More...
 
size_t V12_API Engine::TZTimeHelper::tzTimestampToString (char *data, size_t lenght, const TZTimestamp &timestamp, TimeFlags flags)
 Converts to char buffer TZTimestamp( "YYYYMMDD-HH:MM:SS[.sss][Z | [ + | - hh[:mm]]]" ) without terminating zero. More...
 
size_t V12_API Engine::TZTimeHelper::utcDateOnlyToString (char *data, size_t lenght, const UTCDateOnly date)
 Converts to char buffer UTCDateOnly( "YYYYMMDD" ) without terminating zero. More...
 
size_t V12_API Engine::TZTimeHelper::utcTimeOnlyToString (char *data, size_t lenght, const UTCTimeOnly &time, TimeFlags flags=Milliseconds)
 Converts to char buffer UTCTimeOnly( "HH:MM:SS[.sss]" ) without terminating zero. More...
 
void V12_API Engine::TZTimeHelper::utcTimestampFromTimeSpec (UTCTimestamp &timestamp, const struct timespec &ts)
 Converts timespec to UTCTimestamp. More...
 
void V12_API Engine::TZTimeHelper::utcTimestampFromTimeT (UTCTimestamp &timestamp, time_t time_utc)
 Converts time_t to UTCTimestamp. More...
 
void V12_API Engine::TZTimeHelper::utcTimestampFromTZTimestamp (UTCTimestamp &utcTimestamp, const TZTimestamp &tzTimestamp)
 Converts TZTimestamp to UTCTimestamp. More...
 
size_t V12_API Engine::TZTimeHelper::utcTimestampToString (char *data, size_t lenght, const UTCTimestamp &timestamp, TimeFlags flags=Milliseconds)
 Converts to string UTCTimestamp( "YYYYMMDD-HH:MM:SS[.sss]" ) without terminating zero. More...
 

Variables

static const unsigned int Engine::TZTimeHelper::ValueSizeBufferTZTimeOnly = sizeof( "HH:MM:SS.ssssssssssss+OO:OO" )-1
 Minimum size buffer for convert to format TZTimeOnly. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeBufferTZTimestamp = sizeof( "YYYYMMDD-HH:MM:SS.ssssssssssss+OO:OO" )-1
 Minimum size buffer for convert to format TZTimestamp. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeBufferUTCDateOnly = sizeof( "YYYYMMDD" )-1
 Minimum size buffer for convert to format UTCDateOnly. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeBufferUTCTimeOnly = sizeof( "HH:MM:SS.ssssssssssss" )-1
 Minimum size buffer for convert to format UTCTimeOnly. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeBufferUTCTimestamp = sizeof( "YYYYMMDD-HH:MM:SS.ssssssssssss" )-1
 Minimum size buffer for convert to format UTCTimestamp. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlyMicro = sizeof( "HH:MM:SS.ssssss" )-1
 Lenght of string format UTCTimeOnly with microsecond. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlyMilli = sizeof( "HH:MM:SS.sss" )-1
 Lenght of string format UTCTimeOnly with millisecond. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlyNano = sizeof( "HH:MM:SS.sssssssss" )-1
 Lenght of string format UTCTimeOnly with nanosecond. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlyPico = sizeof( "HH:MM:SS.ssssssssssss" )-1
 Lenght of string format UTCTimeOnly with picosecond. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimeOnlySec = sizeof( "HH:MM:SS" )-1
 Lenght of string format UTCTimeOnly with second. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampMicro = sizeof( "YYYYMMDD-HH:MM:SS.ssssss" )-1
 Lenght of string format UTCTimestamp with microsecond. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampMilli = sizeof( "YYYYMMDD-HH:MM:SS.sss" )-1
 Lenght of string format UTCTimestamp with millisecond. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampNano = sizeof( "YYYYMMDD-HH:MM:SS.sssssssss" )-1
 Lenght of string format UTCTimestamp with nanosecond. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampPico = sizeof( "YYYYMMDD-HH:MM:SS.ssssssssssss" )-1
 Lenght of string format UTCTimestamp with picosecond. More...
 
static const unsigned int Engine::TZTimeHelper::ValueSizeUTCTimestampSec = sizeof( "YYYYMMDD-HH:MM:SS" )-1
 Lenght of string format UTCTimestamp with second. More...
 

Detailed Description

Contains Engine::TZTimeHelper function.