BoosterSeat  0.1
A C++ library that includes common utilities that are used in other projects.
time.hpp File Reference
#include <BoosterSeat/clock.hpp>
#include <iomanip>
#include <sstream>
#include <string>
Include dependency graph for time.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  bst::Time
 The generic time class for BoosterSeat. Uses UTC time. More...
 

Namespaces

 bst
 
 bst::time
 

Enumerations

enum class  bst::time::TimeZone { bst::time::UTC , bst::time::LOCAL }
 

Functions

std::string bst::time::dateAndTimeString (const bst::clck::TimePoint &time_point)
 
std::string bst::time::dateAndTimeString (TimeZone time_zone=TimeZone::LOCAL, char date_delimiter='-', char between_delimiter=' ', char time_delimiter=':', bst::clck::TimePoint time_point=bst::clck::now())
 Get the date and time in the format: YYYY-MM-DD HH:MM:SS. More...
 
bst::clck::TimePoint bst::time::dateAndTimeToTimePoint (int year, int month, int day, int hour, int minute, int second)
 Convert a date and time to a bst::clck::TimePoint. More...
 
std::string bst::time::dateString (TimeZone time_zone=TimeZone::LOCAL, char delimiter='-')
 
std::string bst::time::elapsedAsciiClock (const bst::clck::TimePoint &time_point)
 
uint32_t bst::getUnixTime ()
 Get the current Unix time. More...
 
std::string bst::time::timeString (TimeZone time_zone=TimeZone::LOCAL, char delimiter=':', bst::clck::TimePoint time_point=bst::clck::now())
 Get the time in format: HH:MM:SS (24 hour clock) for a given time zone. More...