Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-iso8583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 31d6a4df
authored
Jun 24, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Perubahan rumus STAN generator
1 parent
aff50116
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
CHANGES.txt
opensipkd/iso8583/network/doc.py
CHANGES.txt
View file @
31d6a4d
0.1.6 2020-06-24
----------------
- Perubahan rumus StanGenerator
0.1.5 2020-05-09
----------------
- Bug fixed pada mitracomm.py. Seluruh streamer kini bekerja dengan bytes tidak
...
...
opensipkd/iso8583/network/doc.py
View file @
31d6a4d
from
datetime
import
datetime
from
datetime
import
(
datetime
,
date
,
)
from
ISO8583.ISOErrors
import
BitNotSet
from
opensipkd.string
import
(
DateTimeVar
,
...
...
@@ -15,17 +18,19 @@ from .structure import (
class
StanGenerator
:
def
__init__
(
self
):
self
.
stan
=
'0'
*
6
self
.
tgl
=
None
def
reset
(
self
):
self
.
seq
=
int
(
datetime
.
now
()
.
strftime
(
'
%
H
%
M
%
S'
))
def
create
(
self
):
kini
=
datetime
.
now
()
new_stan
=
kini
.
strftime
(
'
%
H
%
M
%
S'
)
if
new_stan
==
self
.
stan
:
new_stan
=
int
(
self
.
stan
)
+
1
self
.
stan
=
str
(
new_stan
)
.
zfill
(
6
)
kini
=
date
.
today
()
if
kini
==
self
.
tgl
:
self
.
seq
+=
1
else
:
self
.
stan
=
new_stan
return
self
.
stan
self
.
tgl
=
kini
self
.
reset
()
return
str
(
self
.
seq
)
.
zfill
(
6
)
stan_gen
=
StanGenerator
()
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment