File: DateFuncs.h

package info (click to toggle)
drogon 1.9.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,096 kB
  • sloc: cpp: 52,222; sh: 249; xml: 20; makefile: 11
file content (14 lines) | stat: -rw-r--r-- 319 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once
#include "RedisCache.h"

template <>
inline trantor::Date fromString<trantor::Date>(const std::string &str)
{
    return trantor::Date(std::atoll(str.data()));
}

template <>
inline std::string toString<trantor::Date>(const trantor::Date &date)
{
    return std::to_string(date.microSecondsSinceEpoch());
}