public static ConstructorValueNowUtcProvider NewFromNowLocal(DateTime nowLocal) { var utcNow = nowLocal.ToUniversalTime(); var constantValueNowUtcProvider = new ConstructorValueNowUtcProvider(utcNow); return(constantValueNowUtcProvider); }
public static ConstructorValueNowUtcProvider NewFromOffset(TimeSpan offset) { var offsetNowUtc = DateTime.UtcNow + offset; var constantValueNowUtcProvider = ConstructorValueNowUtcProvider.NewFromNowUtc(offsetNowUtc); return(constantValueNowUtcProvider); }
/// <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); }