Example #1
0
        public static ConstructorValueNowUtcProvider NewFromNowLocal(DateTime nowLocal)
        {
            var utcNow = nowLocal.ToUniversalTime();

            var constantValueNowUtcProvider = new ConstructorValueNowUtcProvider(utcNow);

            return(constantValueNowUtcProvider);
        }
Example #2
0
        public static ConstructorValueNowUtcProvider NewFromOffset(TimeSpan offset)
        {
            var offsetNowUtc = DateTime.UtcNow + offset;

            var constantValueNowUtcProvider = ConstructorValueNowUtcProvider.NewFromNowUtc(offsetNowUtc);

            return(constantValueNowUtcProvider);
        }
Example #3
0
        /// <summary>
        /// Uses the <see cref="ConstructorValueNowUtcProvider.NewFromNowUtc(DateTime)"/> as the default.
        /// </summary>
        public static ConstructorValueNowUtcProvider New(DateTime nowUtc)
        {
            var constantValueNowUtcProvider = ConstructorValueNowUtcProvider.NewFromNowUtc(nowUtc);

            return(constantValueNowUtcProvider);
        }