Android load timezone too long: Loaded time zone names for en_US

前端 未结 1 395
生来不讨喜
生来不讨喜 2021-01-06 05:44

Dear all, i just code a snippet code to get date time string as below:

public static String getCurrentDate(){
    Locale.setDefault(Locale.US);
    Date date         


        
1条回答
  •  悲哀的现实
    2021-01-06 06:26

    Yet another solution is to use SimpleDateFormat with default locale

    new SimpleDateFormat("dd/MM", Locale.getDefault());
    

    0 讨论(0)
提交回复
热议问题