我试图通过使用java.text.SimpleDateFormat将String格式的日期转换为java.util.Date,但是它没有给我正确的输出.请帮忙!
我的输入是由Django date生成的:ex."2014-01-20T07:17:06.150995 + 00:00"
但是,我得到了"Mon Jan 20 15:19:36 GMT + 08:00 2014"而不是"Mon Jan 20 15:17:06 GMT + 08:00 2014"
这是我的测试代码:
String s = "2014-01-20T07:17:06.150995+00:00";
SimpleDateFormat sdf;
String fmt = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZZZZ";
sdf = new SimpleDateFormat(fmt, Locale.US);
String result = "";
try {
Date date = sdf.parse(s);
Log.d(Constants.LOG_TAG, date.toString());
result = date.toString();
} catch (Exception e) {
Log.d(Constants.LOG_TAG, "date formatting error" + e.getMessage());
}
Log.d(Constants.LOG_TAG, "date test >> " + result);
Run Code Online (Sandbox Code Playgroud) 我使用的是Qt Creator 3.6.1
用Qt 5.6.0 (Clang 7.0 (Apple), 64 bit)
了,我遇到了一些问题,而试图创建一个用于部署的应用程序包.
注意:调用应用程序名称 bibi
Qt Creator
bibi.app
在build-bibi-Desktop_Qt_5_6_0_clang_64bit-Release/
文件夹下成功生成bibi.app
无法在其他Mac上成功链接Qtmacdeployqt
没有解决问题以下是详细信息:
otool
> otool -L build-bibi-Desktop_Qt_5_6_0_clang_64bit-Release/bibi.app/Contents/MacOS/bibi
build-bibi-Desktop_Qt_5_6_0_clang_64bit-Release/bibi.app/Contents/MacOS/bibi:
@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.6.0, current version 5.6.0)
@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.6.0, current version 5.6.0)
@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
/usr/lib/libSystem.B.dylib (compatibility version …
Run Code Online (Sandbox Code Playgroud)