Example #1
0
        /// <summary>
        /// Set the file timestamp.
        /// </summary>
        public void SetTimeStamp()
        {
            if (null == date)
            {
                DateTime now = DateTime.Now;
                // File system time is stored without regards to daylight savings time
                //  therefore if the file time is different then we can assume
                //  that daylight savings is in effect.
//                if (now.ToFileTime() != now.Ticks) {
//                    now = now.AddHours(-1);
//                }
                now                 = now.AddHours(-1);
                date                = DateParser.GetCvsDateString(now);
                this.timestamp      = now;
                this.isUtcTimeStamp = false;
            }
            else
            {
                this.timestamp      = DateParser.ParseCvsDate(date);
                this.isUtcTimeStamp = true;
            }
            if (LOGGER.IsDebugEnabled)
            {
                StringBuilder msg = new StringBuilder();
                msg.Append("timestamp=[").Append(timestamp).Append("]");
                msg.Append("date=[").Append(date).Append("]");
                LOGGER.Debug(msg);
            }
        }