Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TimeSpanToOffset()

string System.Net.Mime.SmtpDateTime.TimeSpanToOffset ( TimeSpan span)
inlinepackage

Definition at line 192 of file SmtpDateTime.cs.

193 {
194 if (span.Ticks == 0L)
195 {
196 return "+0000";
197 }
198 uint num = (uint)Math.Abs(Math.Floor(span.TotalHours));
199 uint num2 = (uint)Math.Abs(span.Minutes);
200 string text = ((span.Ticks > 0) ? "+" : "-");
201 if (num < 10)
202 {
203 text += "0";
204 }
205 text += num;
206 if (num2 < 10)
207 {
208 text += "0";
209 }
210 return text + num2;
211 }

References System.Math.Abs(), System.Math.Floor(), System.L, and System.text.

Referenced by System.Net.Mime.SmtpDateTime.ToString().