Skip to main content
Version: 5.11.8

GetServerTime

public BackendReturnObject GetServerTime();

Description

The current time of the BACKND server is received.
The time zone of the BACKND server is UTC(Universal Time Coordinated), and South Korean time is UTC + 9. Daylight savings time is not applied to UTC.

If you want to use it as a string type, use the 'time' variable; to use it as a DateTime type, use 'parsedDate.' DateTime.Parse converts the string expression of time and date to the relevant DateTime using the rules of the current thread's region.

This function can be used without BACKND login(access token).

Example

Synchronous

BackendReturnObject servertime = Backend.Utils.GetServerTime();

string time = servertime.GetReturnValuetoJSON()["utcTime"].ToString();
DateTime parsedDate = DateTime.Parse(time);

Asynchronous

Backend.Utils.GetServerTime((callback) => 
{
string time = callback.GetReturnValuetoJSON()["utcTime"].ToString();
DateTime parsedDate = DateTime.Parse(time);
});

SendQueue

SendQueue.Enqueue(Backend.Utils.GetServerTime, (callback) => 
{
string time = callback.GetReturnValuetoJSON()["utcTime"].ToString();
DateTime parsedDate = DateTime.Parse(time);
});

Return cases

Success cases

When the lookup is successful
statusCode : 200

returnValue : refer to GetReturnValuetoJSON

GetReturnValuetoJSON

{
"utcTime": "2019-04-10T08:54:43.274Z"
}