Exemple #1
0
        public static int GetSecondsFromString(string dateString, int defaultValue)
        {
            if (string.IsNullOrEmpty(dateString))
            {
                Service.Get <StaRTSLogger>().Warn("Missing Date Info!");
                return(defaultValue);
            }
            DateTime date = DateTime.ParseExact(dateString, "HH:mm,dd-MM-yyyy", CultureInfo.InvariantCulture);

            return(DateUtils.GetSecondsFromEpoch(date));
        }
Exemple #2
0
 public static uint GetNowSeconds()
 {
     return((uint)DateUtils.GetSecondsFromEpoch(DateTime.get_UtcNow()));
 }
Exemple #3
0
 public unsafe static long $Invoke5(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(DateUtils.GetSecondsFromEpoch(*(*(IntPtr *)args))));
 }