-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Štafety - export výsledků s mezičasy #382
- Loading branch information
Showing
16 changed files
with
437 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
libquickevent/libquickeventcore/include/quickevent/core/utils.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "../../../src/utils.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "utils.h" | ||
|
||
#include <QDateTime> | ||
|
||
namespace quickevent { | ||
namespace core { | ||
|
||
QString Utils::dateTimeToIsoStringWithUtcOffset(const QDateTime &dt) | ||
{ | ||
QString ret = dt.toString(Qt::ISODate); | ||
if(dt.timeSpec() == Qt::LocalTime) { | ||
int offset_min = dt.offsetFromUtc(); | ||
if(offset_min == 0) { | ||
ret += 'Z'; | ||
} | ||
else { | ||
if(offset_min < 0) { | ||
ret += '-'; | ||
offset_min = -offset_min; | ||
} | ||
else { | ||
ret += '+'; | ||
} | ||
ret += QStringLiteral("%1:%2").arg(offset_min / (60 * 60), 2, 10, QChar('0')).arg((offset_min / 60) % 60, 2, 10, QChar('0')); | ||
} | ||
} | ||
return ret; | ||
} | ||
|
||
} // namespace core | ||
} // namespace quickevent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#ifndef QUICKEVENT_CORE_UTILS_H | ||
#define QUICKEVENT_CORE_UTILS_H | ||
|
||
#include "quickeventcoreglobal.h" | ||
|
||
class QDateTime; | ||
|
||
namespace quickevent { | ||
namespace core { | ||
|
||
class QUICKEVENTCORE_DECL_EXPORT Utils | ||
{ | ||
public: | ||
static QString dateTimeToIsoStringWithUtcOffset(const QDateTime &dt); | ||
}; | ||
|
||
} // namespace core | ||
} // namespace quickevent | ||
|
||
#endif // QUICKEVENT_CORE_UTILS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.