如何在 _JAVA_OPTIONS 中设置所有时区变量

How to set all timezone variables in _JAVA_OPTIONS

我在环境变量 _JAVA_OPTIONS 中将时区设置为 -Duser.timezone=GMT

如果我必须向时区的其他变量添加值,我应该如何将其包含在 _JAVA_OPTIONS 中?

我想为 dstSavings 添加值。

id=GMT,offset=0,dstSavings=3600000,useDaylight=false,startYear=0,startMode=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0

你可以给一个长字符串作为环境值。

_JAVA_OPTIONS="-Dsome=value -Dsomething.else=someothervalue .."

所以你的可能是..

 _JAVA_OPTIONS="-Duser.timezone=GMT  -DdstSavings=id=GMT,offset=0,dstSavings=3600000,useDaylight=false,startYear=0,startMode=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0"