コード例 #1
0
        public static OffsetNowProvider NewFromDesiredNowUtc(DateTime desiredNowUtc)
        {
            var offset = DateTime.UtcNow - desiredNowUtc;

            var offsetNowProvider = OffsetNowProvider.NewFromOffset(offset);

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

            var offsetNowProvider = OffsetNowProvider.NewFromOffset(offset);

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

            return(offsetNowProvider);
        }