Is DateTime.parse() in Ruby dependent on locale?
问题 I'm wondering regarding the output of the following example: when parsing 01/03 , will it be resolved as Mar, 1st or Jan, 3rd ? 回答1: Ruby is not locale dependent. Because Ruby is a server-side language and not a client-side language like JavaScript, Ruby uses the system clock from your web app server - and uses this information to calculate the time. Whatever timezone you have your system set to is what your Ruby app will use. When parsing a date from a string, DateTime will make its best