mirror of https://github.com/citusdata/citus.git
fix to localtime
parent
91cf0cc2c8
commit
b99d717799
|
@ -10,6 +10,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "c.h"
|
#include "c.h"
|
||||||
|
@ -67,8 +68,8 @@ void
|
||||||
send_sql_restorepoint_cmd(Datum main_arg)
|
send_sql_restorepoint_cmd(Datum main_arg)
|
||||||
{
|
{
|
||||||
StringInfoData sql;
|
StringInfoData sql;
|
||||||
struct pg_tm* tt;
|
|
||||||
pg_time_t t = time(NULL);
|
pg_time_t t = time(NULL);
|
||||||
|
struct tm * tt = localtime(&t);
|
||||||
Oid databaseOid = DatumGetObjectId(main_arg);
|
Oid databaseOid = DatumGetObjectId(main_arg);
|
||||||
Oid extensionOwner = InvalidOid;
|
Oid extensionOwner = InvalidOid;
|
||||||
int spiStatus;
|
int spiStatus;
|
||||||
|
@ -153,10 +154,9 @@ SendRestorePointCmd(Oid DatabaseId, Oid UserOid)
|
||||||
|
|
||||||
void CheckRestoreInterval(Oid databaseId, Oid userOid)
|
void CheckRestoreInterval(Oid databaseId, Oid userOid)
|
||||||
{
|
{
|
||||||
struct pg_tm* tt;
|
|
||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
|
struct tm * tt = localtime(&t);
|
||||||
|
|
||||||
tt = pg_localtime(&t, log_timezone);
|
|
||||||
|
|
||||||
if (tt->tm_min > 0) {
|
if (tt->tm_min > 0) {
|
||||||
is_first_inday = true;
|
is_first_inday = true;
|
||||||
|
|
Loading…
Reference in New Issue