03 2022 档案
摘要:InvalidCastException:'timestamp with time zone'. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.
搜关键词 `EnableLegacyTimestampBehavior`,找到官网的解释:https://www.npgsql.org/doc/types/datetime.html#timestamps-and-timezones
在 `Main` 入口加上
```C#
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
AppContext.SetSwitch("Npgsql.DisableDateTimeInfinityConversions", true);
```
重新执行 `dotnet run` 命令,问题解决。
阅读全文
摘要:手撸基于ASCII码表的校验密码方法。
附赠正则表达式
密码规则:包含 数字,大小写,特殊字符^%&',;=?$\",长度8~20位。
阅读全文