-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystemTime.cs
More file actions
40 lines (32 loc) · 1.04 KB
/
SystemTime.cs
File metadata and controls
40 lines (32 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// -------------------------------------------------------------------------
// Copyright (c) Mecalc (Pty) Limited. All rights reserved.
// -------------------------------------------------------------------------
using System;
namespace QProtocol
{
/// <summary>
/// This class can be used to decode the System Time Endpoint request.
/// </summary>
[Serializable]
public class SystemTime
{
public int Year { get; set; }
public int Month { get; set; }
public int Day { get; set; }
public int Hour { get; set; }
public int Minutes { get; set; }
public int Seconds { get; set; }
public static SystemTime GetPresentTime()
{
return new SystemTime
{
Year = DateTime.Now.Year,
Month = DateTime.Now.Month,
Day = DateTime.Now.Day,
Hour = DateTime.Now.Hour,
Minutes = DateTime.Now.Minute,
Seconds = DateTime.Now.Second,
};
}
}
}