KIO
Go to the documentation of this file. 24 #include <QtCore/QString> 27 #include <QtCore/QDate> 34 QDateTime ASN1_UTCTIME_QDateTime(ASN1_UTCTIME *tm,
int *isGmt) {
39 int y=0,
M=0,d=0,h=0,m=0,s=0;
46 if (i < 10)
goto auq_err;
47 if (v[i-1] ==
'Z') gmt=1;
49 if ((v[i] >
'9') || (v[i] <
'0'))
goto auq_err;
50 y = (v[0]-
'0')*10+(v[1]-
'0');
52 M = (v[2]-
'0')*10+(v[3]-
'0');
53 if ((M > 12) || (
M < 1))
goto auq_err;
54 d = (v[4]-
'0')*10+(v[5]-
'0');
55 h = (v[6]-
'0')*10+(v[7]-
'0');
56 m = (v[8]-
'0')*10+(v[9]-
'0');
57 if ( (v[10] >=
'0') && (v[10] <=
'9') &&
58 (v[11] >=
'0') && (v[11] <=
'9'))
59 s = (v[10]-
'0')*10+(v[11]-
'0');
62 qdate.setYMD(y+1900, M, d);
64 qdt.setDate(qdate); qdt.setTime(qtime);
66 if (isGmt) *isGmt = gmt;
71 QString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm) {
74 QDateTime qdt = ASN1_UTCTIME_QDateTime(tm, &gmt);
84 QString ASN1_INTEGER_QString(ASN1_INTEGER *aint) {
85 char *rep = KOSSL::self()->i2s_ASN1_INTEGER(NULL, aint);
87 KOSSL::self()->OPENSSL_free(rep);
QString i18n(const char *text)
QString formatDateTime(const QDateTime &dateTime, DateFormat format=ShortDate, bool includeSecs=false) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2017 The KDE developers.
Generated on Sat May 13 2017 06:42:41 by
doxygen 1.8.13 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.