Example #1
0
        public static OffsetNowProvider NewFromDesiredNowUtc(DateTime desiredNowUtc)
        {
            var offset = DateTime.UtcNow - desiredNowUtc;

            var offsetNowProvider = OffsetNowProvider.NewFromOffset(offset);

            return(offsetNowProvider);
        }
Example #2
0
        public static OffsetNowProvider NewFromDesiredNowLocal(DateTime desiredNowLocal)
        {
            var offset = DateTime.Now - desiredNowLocal;

            var offsetNowProvider = OffsetNowProvider.NewFromOffset(offset);

            return(offsetNowProvider);
        }
Example #3
0
        public static OffsetNowProvider New(TimeSpan offset)
        {
            var offsetNowProvider = OffsetNowProvider.NewFromOffset(offset);

            return(offsetNowProvider);
        }