/*
* Copyright (C) 2005-2013 Team XBMC
- * http://www.xbmc.org
+ * http://xbmc.org
*
* This Program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
*/
+#include "utils/StdString.h"
#include "utils/Archive.h"
/*! \brief TIME_FORMAT enum/bitmask used for formatting time strings
int GetHours() const;
int GetMinutes() const;
int GetSeconds() const;
+ int GetSecondsTotal() const;
private:
void ToULargeInt(ULARGE_INTEGER& time) const;
CDateTime(int year, int month, int day, int hour, int minute, int second);
virtual ~CDateTime() {}
- void SetFromDateString(const CStdString &date);
+ bool SetFromDateString(const CStdString &date);
static CDateTime GetCurrentDateTime();
static CDateTime GetUTCDateTime();
int GetDayOfWeek() const;
int GetMinuteOfDay() const;
- void SetDateTime(int year, int month, int day, int hour, int minute, int second);
- void SetDate(int year, int month, int day);
- void SetTime(int hour, int minute, int second);
- void SetFromDBDate(const CStdString &date);
- void SetFromDBTime(const CStdString &time);
- void SetFromW3CDate(const CStdString &date);
- void SetFromUTCDateTime(const CDateTime &dateTime);
- void SetFromUTCDateTime(const time_t &dateTime);
- void SetFromRFC1123DateTime(const CStdString &dateTime);
+ bool SetDateTime(int year, int month, int day, int hour, int minute, int second);
+ bool SetDate(int year, int month, int day);
+ bool SetTime(int hour, int minute, int second);
+ bool SetFromDBDate(const CStdString &date);
+ bool SetFromDBTime(const CStdString &time);
+ bool SetFromW3CDate(const CStdString &date);
+ bool SetFromUTCDateTime(const CDateTime &dateTime);
+ bool SetFromUTCDateTime(const time_t &dateTime);
+ bool SetFromRFC1123DateTime(const CStdString &dateTime);
/*! \brief set from a database datetime format YYYY-MM-DD HH:MM:SS
\sa GetAsDBDateTime()
*/
- void SetFromDBDateTime(const CStdString &dateTime);
+ bool SetFromDBDateTime(const CStdString &dateTime);
void GetAsSystemTime(SYSTEMTIME& time) const;
void GetAsTime(time_t& time) const;