diff options
Diffstat (limited to 'projecttemplates/RelyingPartyLogic/Utilities.cs')
-rw-r--r-- | projecttemplates/RelyingPartyLogic/Utilities.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/projecttemplates/RelyingPartyLogic/Utilities.cs b/projecttemplates/RelyingPartyLogic/Utilities.cs index 02eb273..affbe26 100644 --- a/projecttemplates/RelyingPartyLogic/Utilities.cs +++ b/projecttemplates/RelyingPartyLogic/Utilities.cs @@ -60,5 +60,13 @@ GO serverConnection.Disconnect(); } } + + internal static void VerifyThrowNotLocalTime(DateTime value) { + // When we want UTC time, we have to accept Unspecified kind + // because that's how it is set to us in the database. + if (value.Kind == DateTimeKind.Local) { + throw new ArgumentException("DateTime must be given in UTC time but was " + value.Kind.ToString()); + } + } } } |