Ejemplo n.º 1
0
        /// <summary>
        /// Retrieves the (local) time when the user logged into this Windows machine for the last time.
        /// Default value is <see cref="DateTime.Now"/> if the actual value could not be determined.
        /// </summary>
        /// <param name="day">Defines the specific day from which the data will be looked up.</param>
        /// <returns>Returns latest logon time in LOCAL time.</returns>
        public static DateTime SetLastDayWorkEndTimeIfEmpty(DateTime day)
        {
            var logOff = EventLogReader.GetLogOff(day);

            return(logOff);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Retrieves the (local) time when the user logged into this Windows machine for the last time.
        /// Default value is <see cref="DateTime.Now"/> if the actual value could not be determined.
        /// </summary>
        /// <param name="day">Defines the specific day from which the data will be looked up.</param>
        /// <returns>Returns latest logon time in LOCAL time.</returns>
        public static DateTime GetLastLogOnToMachine(DateTime day)
        {
            var logOn = EventLogReader.GetLogOn(day);

            return(logOn);
        }