回答編集履歴

3

hours の指定ミス修正

2019/05/14 01:52

投稿

tamoto
tamoto

スコア4105

test CHANGED
@@ -14,7 +14,7 @@
14
14
 
15
15
  var culture = new CultureInfo("en-US");
16
16
 
17
- var parsed = DateTime.ParseExact(date, "ddd MMM d hh:mm:ss K yyyy", culture);
17
+ var parsed = DateTime.ParseExact(date, "ddd MMM d HH:mm:ss K yyyy", culture);
18
18
 
19
19
  ```
20
20
 

2

カルチャの指定を追加

2019/05/14 01:52

投稿

tamoto
tamoto

スコア4105

test CHANGED
@@ -12,7 +12,9 @@
12
12
 
13
13
  var date = "Tue May 14 00:55:33 +0000 2019";
14
14
 
15
+ var culture = new CultureInfo("en-US");
16
+
15
- var parsed = DateTime.ParseExact(date, "ddd MMM d hh:mm:ss K yyyy", null);
17
+ var parsed = DateTime.ParseExact(date, "ddd MMM d hh:mm:ss K yyyy", culture);
16
18
 
17
19
  ```
18
20
 

1

誤字修正

2019/05/14 01:43

投稿

tamoto
tamoto

スコア4105

test CHANGED
@@ -20,4 +20,4 @@
20
20
 
21
21
  文字列のフォーマット書式については以下を参照してください。
22
22
 
23
- [Custom date and time format strings - .NET | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings)]
23
+ [Custom date and time format strings - .NET | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings)