Class Time
A namespace to obtain time information from the Game Jolt server.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: GameJolt.Services
Assembly: GameJolt.dll
Syntax
public class Time : Service
Methods
| Improve this Doc View SourceGet(Action<Response<DateTime>>)
Returns the time of the Game Jolt server.
Declaration
public void Get(Action<Response<DateTime>> callback)
Parameters
Type | Name | Description |
---|---|---|
System.Action<Response<System.DateTime>> | callback | Action that is called on completion or error. |
GetAsync()
Returns the time of the Game Jolt server.
Declaration
public Task<Response<DateTime>> GetAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Response<System.DateTime>> |
GetTimeZone(String)
Helper function which converts an Olson timezone (tz-database) to a .NET timezone. For example "America/New_York" is translated to "Eastern Standard Time"
Declaration
public static TimeZoneInfo GetTimeZone(string olsonTimeZoneId)
Parameters
Type | Name | Description |
---|---|---|
System.String | olsonTimeZoneId | Olson timezone, for e.g. "America/New_York" |
Returns
Type | Description |
---|---|
System.TimeZoneInfo |